how to rename line bodies in the Mechanical tree based on their assigned cross-section?

Rohith Patchigolla
Member, Moderator, Employee Posts: 251
✭✭✭✭
how to rename line bodies in the Mechanical tree based on their assigned cross-section?
Tagged:
0
Answers
-
Try using the below code in Mechanical scripting console
linebodies = [child for child in DataModel.GetObjectsByType(DataModelObjectCategory.Body) if child.GeometryType == GeometryType.Line] for linebody in linebodies: linebody.Name = "Beam CS - " + linebody.CrossSectionName
0