Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I want to change the File Name with the Common name in the Model Tree.
I can expand the model tree with the Common name but not switch them.
Does anyone know if and how it is possible to do that?
If I want the PTC_COMMON_NAME parameter to match the file name of the model, I set it with a relation:
ptc_common_name = rel_model_name()
The only other way I've seen to directly change both of these is if I'm changing the name of the model only in the session. Otherwise, the PTC_COMMON_NAME parameter is protected from direct changes, likely since it plays a part in Windchill?
I cant follow your point. The PTC_COMMON_NAME is changeable but the rel_model_name cant be changed.
In that case it isnt possible to switch them in general.
Yes it plays a part in Windchill.
Perhaps I didn't explain correctly. rel_model_name() is not a parameter. It is a function that returns a string containing the file name of the current model. For example, if I'm working on file "mypart.prt", rel_model_name() will return "MYPART".
To change the results of calling rel_model_name(), you need only change the name of the file you are working on.
If I have the relation I previously described in place, whenever I rename a file, the PTC_COMMON_NAME will update to reflect that changed file name, too.
Again, since I don't use Windchill, I don't know if its use involves some further restrictions on messing around with PTC_COMMON_NAME.
i guess i got your point now, thanks for the description.
But i want to have two different names. The Model name must be a number for example: 02928401982.prt and the common name: Mypart
That is how it must be. Now i wanted to switch the common name with the model name in the tree just visually.
In that case the common name is written where actually the model name is and below that you should see your KE´s.
But i guess that is not possible.
The common name in Creo is for my understanding the opposite, The common name in Creo gives you the freedom to use any (wchar) character you want for your numbering system. On top you can use character which are not allowed to use for file names like ‘/:@‘ and so on. In Creo you can’t use a .+, as the first character as well for example.
The common name can be used to continue with your current numbering system. In my point of view you should use this. This may save a tremendous amount of money for your company. And as already mentioned, there is logic which may protect this parameter for further changes.
If your company uses only a numbering system which matches the requirement for Creo file names, you should have a simple notify function to sync this if possible.
If you are using Windchill: see https://www.ptc.com/en/support/article/CS245234 and keep in mind, that a Windchill connected Creo behaves different in some aspects.