How to scope a joint to Joint probe?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 389
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How to scope a joint to Joint probe?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 389
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓
    joint_probe = solution.AddJointProbe()
    bc = joint_probe.PropertyByName("BoundaryConditionSelection")
    # Get the Joint Object Id needed
    bc.InternalValue = ExtAPI.DataModel.GetObjectsByType(Ansys.ACT.Automation.Mechanical.Connections.Joint)[2].ObjectId
    
  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 741
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓

    A simpler solution now exists (tested in 2021R2):

    connections = ExtAPI.DataModel.Project.Model.Connections
    joints = connections.GetChildren(DataModelObjectCategory.Joint,True)
    analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
    for joint in joints:
        joint_probe = analysis.Solution.AddJointProbe()
        joint_probe.BoundaryConditionSelection = joint