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?

