How to get the Folders in my PDM tree

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, jacs, Daniel

cam
Master Corporal
Master Corporal
Posts: 39
Joined: Fri Oct 02, 2009 9:46 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.8
Location: Germany

How to get the Folders in my PDM tree

Unread post 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 ?
Last edited by cam on Tue Oct 25, 2016 2:32 pm, edited 1 time in total.
Greetings
Chris
AndiKS
Corporal
Corporal
Posts: 24
Joined: Fri Jul 31, 2009 10:43 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26

Re: How to get the Folders in my PDM tree

Unread post by AndiKS »

Hello,

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

cu
Andi
Mark Oostveen
Chief
Chief
Posts: 107
Joined: Mon Mar 26, 2007 9:40 am
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26
Location: The netherlands
Contact:

Re: How to get the Folders in my PDM tree

Unread post 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
Post Reply