Page 1 of 1

How to get the Folders in my PDM tree

Posted: Thu Oct 06, 2016 9:48 am
by cam
Hi there,

how can I get the folderstructure of my PDM ?
I try to write a little C# program that creates automaticly a project with a template in a specific folder in my PDM struture.
At the moment, the program creates the project direct under the root folder. I think the problem is that I don't know the root folder ID

void GetProjectFolderConstituents(
PdmProjectFolderId inProjectFolderdId,
out List<PdmProjectFolderId> outFolderIds,
out List<PdmObjectId> outProjectIds
)

Is this the methode to get the struture ?
How can I get the PdmProjectFolderId of the root folder ?

Re: How to get the Folders in my PDM tree

Posted: Thu Oct 06, 2016 6:44 pm
by AndiKS
Hello,

There is a Constant for the Rootfolder:
TopSolidHost.Pdm.WorkingProjectsRootFolder

cu
Andi

Re: How to get the Folders in my PDM tree

Posted: Thu Aug 24, 2017 10:18 am
by Mark Oostveen
Hi,

I have a similar question. I want to "browse" through the "User Template projects" and "Compagny Template project" folders and list all available template projects.

I tried of two options.

1) Use the above WorkingProjectRootFolder constant and start from there. The "Template Project" folders however are not a part of the folderset in this root folder. So no luck

2) Use the GetTemplates option. This one returns the User- and CompagnyProjectTemplateFolder as PdmObjectID. Well great :) However If i want to use the GetProjectFolderConstituents I need a PdmProjectFolderId and not the given PdmObjectID. Casting does not seem to work. And I can't find a way to get from the one type to the oher.

Who can give me a hint?

Thanks