How can I show all bodies in Mechanical through scripting?
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 870
✭✭✭✭
Answers
-
The following function can be used:
def ShowAllBodies(): ''' Show all the bodies in Geometry ''' try: # log("ShowAllBodies") for child in ExtAPI.DataModel.Project.Model.Geometry.Children: if child.DataModelObjectCategory == DataModelObjectCategory.Part: child.Hidden=False ExtAPI.DataModel.Tree.Refresh() except: ExtAPI.Log.WriteMessage("Error : Exception in ShowAllBodies()")
2