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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to set the target folder for part within a customized auto association in Windchill PDMLink

Benny_B
10-Marble

How to set the target folder for part within a customized auto association in Windchill PDMLink

How to set the target folder for part within a customized auto association?

 

I read support article CS277056, there they talk about the EPMWorkspaceHelper.manager.setTargetFolder API.

But when I tried to use it, it needs the new WTPart to be persistence, but on check in an error occurres with the message "The part is persistent!".

 

When the WTPart is not persistent the setTargetFolder function gets a null instead of a object id and doesn't execute. I get the following error: Cannot set target folder for objects that are not newly created.  1 out of 1 objects are not new.

 

Does someone have experience with it, and knows a solution?

Because I want the new WTParts to be in the same context as the EPMDocument when changing folder for new EPMDocument but not in the same folder, so the preference 'Store New Parts with CAD Documents' is not a solution.

ACCEPTED SOLUTION

Accepted Solutions
Benny_B
10-Marble
(To:wcpeetc)

Thanks @wcpeetc  that work for me together with the setContainerReference on a WTPart.

 

View solution in original post

2 REPLIES 2
wcpeetc
2-Explorer
(To:Benny_B)

Use FolderHelper.assignLocation. 

Benny_B
10-Marble
(To:wcpeetc)

Thanks @wcpeetc  that work for me together with the setContainerReference on a WTPart.

 

Announcements

Top Tags