How can I create a bolt pretension probe through scripting?
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 859
✭✭✭✭
Answers
-
The following code can be used:
analysis = ExtAPI.DataModel.Project.Model.Analyses[0] # reference analysis boltPretensionList =analysis.GetChildren(DataModelObjectCategory.BoltPretension,True) # get a list of all bolt pretension objects in the tree solution = ExtAPI.DataModel.Project.Model.Analyses[0].Solution # reference solution boltProbe=solution.AddBoltPretensionProbe() # add a bolt pretension probe boltProbe.Name="abc" # give specific name to result boltProbe.BoundaryConditionSelection=boltPretensionList[0] # select first object in the "boltPretensionList" list
To retrieve the values and unit system, one can use:
boltProbe.MaximumWorkingLoad.Value boltProbe.MaximumWorkingLoad.Unit
2