Skip to main content
12-Amethyst
July 5, 2024
Question

Is it possible to change the File name with the Common name in Model Tree?

  • July 5, 2024
  • 3 replies
  • 2029 views

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?

3 replies

21-Topaz II
July 7, 2024

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?

12-Amethyst
July 8, 2024

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.

21-Topaz II
July 8, 2024

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.

18-Opal
July 7, 2024

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.

 

 

 

 

14-Alexandrite
September 3, 2024

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.