Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

[Script] Get point coordinates selected in SpaceClaim

    • jean.collomb
      Subscriber

      Hello,

      Here's my problem: I'd like to write a Python script that gets the x, y and z coordinates of two points I've selected in SpaceClaim.

      To do this, I've written the following code:

      Python code


      However, the code is sometimes functional, and sometimes non-functional (the "EdgePoint1" command is no longer recognised).

      On the left, the command is not working. On the right, the command is working.

      Not workingworking


      My questions are as follows:
      1- Why is the EdgePoint1 command not always recognised? (And what can I do?)
      2- In general, how can I recover the selections made in SpaceClaim in the Python script (to recover faces, solids, etc.)?

      Thank you,
      Jean

    • Atharv Joshi
      Forum Moderator

      Hi Jean, 

      I think you are using record function in SpaceClaim with Smart Variable. 

      Please try changing the selection to Index and it will recover the selection made in SpaceClaim.

      Thanks and Regards

      Atharv

Viewing 1 reply thread
  • The topic ‘[Script] Get point coordinates selected in SpaceClaim’ is closed to new replies.
[bingo_chatbox]