Can I customize "Rename based on Definition" of results in Mechanical?
Ayush Kumar
Member, Moderator, Employee Posts: 450
✭✭✭✭
Currently Mechanical application automatically renames the result or Result Tracker based on the selected parts and display time of the result object. Can I add more result object properties in the naming scheme?
Tagged:
0
Answers
-
"Rename based on Definition" is a native functionality so probably customizing this is not directly possible. One can however create a very simple workaround by creating a user-button.
- Select all the Tree objects which have to be renamed.
- Hit the "Rename" user-button.
You can access the objects and all their properties in the button (using
ExtAPI.DataModel.Tree.ActiveObjects
) and rename the objects based on whatever property you wish.Example code of the user button - where I add LoadStep number to the existing result object name.
objects = ExtAPI.DataModel.Tree.ActiveObjects for index, res_object in enumerate(objects, start=1): res_object.Name += "LS_%s" % res_object.PropertyByName("LoadStep").InternalValue
4