How can I create a bolt pretension probe through scripting?

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 859
500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
✭✭✭✭
edited June 2023 in Structures

How can I create a bolt pretension probe through scripting?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 859
    500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
    ✭✭✭✭
    Answer ✓

    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