How to scope a joint to Joint probe?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 456
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
edited June 2023 in Structures

How to scope a joint to Joint probe?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 456
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    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: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭
    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