Skip to main content
4-Participant
May 19, 2025
Question

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

  • May 19, 2025
  • 2 replies
  • 1269 views

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? 

2 replies

18-Opal
May 19, 2025

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.

4-Participant
May 20, 2025

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

18-Opal
May 20, 2025

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 😉

24-Ruby III
May 21, 2025

Hi,

try setting following config.pro option

LET_PROE_RENAME_PDM_OBJECTS yes

18-Opal
May 21, 2025

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