We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Access Selection Information Window calculations using ACT?

    • Nick_R
      Subscriber

      Hello, Does anyone know if there is a way to access the Selection Information Window Math using ACT?

      I am looking for a way to extract the Centroid of multiple faces or the radius of an edge. Neither of these quantities is available through traversing the geometry but I did notice they are easily calculated by the selection information pane.

      Thank you for your time

    • Erik Kostson
      Ansys Employee


      The API for the pane is undocumented (it is another API) really so you can not find info (I can not either).
      (It has to be done via old Jscript which I can not help with)

      You can though instead like you tried by traversing the geometry and getting say the centroid of the faces of a body (sample code below):

      treeBodies = Model.Geometry.Children[0].Children
      for treeBody in treeBodies:
      geoBody = treeBody.GetGeoBody faces=geoBody.Faces
      for face in faces:
      cen=face.Centroid
      ExtAPI.Log.WriteMessage('Body :' + str(treeBody.Name) +'; X : ' + str(cen[0]))


      You can try and use this to do what you need.

      Best of luck and take care


Viewing 1 reply thread
  • The topic ‘Access Selection Information Window calculations using ACT?’ is closed to new replies.