Discovery Import

Discovery Import

Scripting – Select a body from a face selection

    • Guillaume ANFOSSI
      Subscriber

      Hi,

      How can i select the body from a selected face ?

      Thanks,

    • Brian Bueno
      Ansys Employee

      GUICAD

      I will have to check with the development team to see if this can be done.

      The syntax for the selection of the face (using the Index values) is

      Selection.Create(GetRootPart().Bodies[0].Faces[0])

      and for the body it would be

      Selection.Create(GetRootPart().Bodies[0])

       

      If you are using the Smart ID, it is Selection.Create(Body1)

      I'm not sure if there is a way to have the script automatically select the parent 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.