Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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?
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.
I cannot use Windchill API, my requirement is to rename the models while check in through creo ws
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
Funny answer, without this he can’t rename at all😵💫