General Mechanical

General Mechanical

ACT Mechanical: Contact Tool Location

    • Maxwell


      I am currently writing an automated simulation process with ACT
      and need to set up a cotact pressure solution with the contact tool.

      But from all my contact regions I just want one to be automatically selected.
      While adding the contact tool or solutions for the tool are not a problem,
      I was looking for hours to find a way to just activate one of the contacts
      but couldn't get anything to work yet.

      The ContactTool.Location returns a Worksheet object, but whenever I want to
      try to add or delete rows in it, or activate parts of it, it just returns an
      "Reference is not set to an instance of an object" error.

      Can anyone explain how to choose contacts in the contact tool using ACT?


      Thank you!

    • Maxwell

      I finally found a possible solution. If anyoneone else experience this problem: 

      Connections = ExtAPI.DataModel.Project.Model.Connections
      ContactNumber = Connections.Children[0].Children.Count

      for i in range(ContactNumber):
            if Connections.Children[0].Children[j].Name != "I_want_to_keep_this":

    • Aniket
      Ansys Employee

      Great find!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.