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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Java rename API needed to rename models (.prt, .asm, .drw) in Creo Workspace - Windchill

IS_11714883
4-Participant

Java rename API needed to rename models (.prt, .asm, .drw) in Creo Workspace - Windchill

I am using the Java API pfcModel.Model.Rename to rename Creo models (e.g., .prt, .asm, .drw) after importing them into the active workspace. While the renaming operation itself is successful—the renamed models appear correctly in the workspace—the issue is that the original models (with their original names) are still retained in the workspace alongside the renamed ones.  The workspace ends up containing both the old and new versions of the same model, effectively duplicating them. When I try to remove old objects it gives error - This is because there is some dependency. The objects cannot be removed without parent object. 

I would like to understand:

  • Is this behavior expected from Model.Rename()?

  • How can I ensure that only the renamed model remains in the workspace and the original (pre-rename) model is completely removed?

  • Also, if I try to remove - how do I deal with dependencies? 
5 REPLIES 5
RPN
17-Peridot
17-Peridot
(To:IS_11714883)

You should talk to your WIndchill Developer, this is for sure a domain of Windchill, rename should (must) happen via the Windchill API's. It is a bad idea to do this in Creo.

IS_11714883
4-Participant
(To:RPN)

I cannot use Windchill API, my requirement is to rename the models while check in through creo ws

RPN
17-Peridot
17-Peridot
(To:IS_11714883)

OOTB this is not possible (as far I know) because of all the Checks you might have in your organization regarding changes and Workflows where the model may part of it. 
You may try unsupported ways with SQL, but this may kill the data structure 😉

Hi,

try setting following config.pro option

LET_PROE_RENAME_PDM_OBJECTS yes


Martin Hanák
RPN
17-Peridot
17-Peridot
(To:MartinHanak)

Funny answer, without this he can’t rename at all😵💫

Announcements


Top Tags