cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to programmatically create "folder" on Project Context.

ptc-5172199
1-Visitor

How to programmatically create "folder" on Project Context.

Hi,

There is a way to automatically create a folder in a project ?

Someone has an example like this in case create a folder within a project

Thanks for the info that can provide me.

example: create folder in aproduct.

java.png

2 REPLIES 2
LoriSood
22-Sapphire III
(To:ptc-5172199)

Ezio,

You should be able to use similar code, but instead of instantiating a PDMLinkProduct you instantiate a Project2 object:

Project2 project= <SOMETHING>;

WTContainerRef projCref = WTContainerRef.newWTContainerRef(project);

SubFolder f4 = FolderHelper.service.createSubFolder("/Default/Folder4", project.getDefaultDomainReference(), projCref);

Hi Lori,

In case the project is different but thank you.

Ezio.

See this example of code java.

ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.projmgmt.admin.Project2:144335");

Project2 project = (Project2) PersistenceHelper.manager.refresh(oid);

WTContainerRef project_ref = WTContainerRef.newWTContainerRef(oid);


Announcements


Top Tags