How can we define automatically an axial force result for all line bodies present in our model?

Erik Kostson
Member, Moderator, Employee Posts: 327
✭✭✭✭
Say we have a model which includes line bodies. How can we automatically create an axial force result for each and every unsuppressed line body present in the model, using scripting?
Tagged:
0
Best Answer
-
Below is one way of doing this:
assm=DataModel.GeoData.Assemblies solution=Model.Analyses[0].Solution for my_assm in assm: for part in my_assm.AllParts: for body in part.Bodies: if body.Suppressed==False and str(body.BodyType)=="GeoBodyWire": my_selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) my_selection.Ids = [body.Id] resfx=solution.AddDirectionalAxialForce() resfx.Location=my_selection ExtAPI.SelectionManager.ClearSelection()
1
This discussion has been closed.