Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Export or Collect the Coordinates of Points on a Sketch

Enes_HIZLIEnes_HIZLI Member Posts: 9
Hello,

I have few points on a sketch. I need to export the coordinates of these points in any format, csv, txt or collecting manually from a pop up message box. I need to have a automated script for this process because I will have a hundred of these points. Does anyone know how to do it?

Comments

  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
    This should be quite straightforward with FeatureScript. Please share a sample document and describe better what you need. X,Y,Z coordinates? With respect to the origin? Etc. 
  • Enes_HIZLIEnes_HIZLI Member Posts: 9
    Think about the one below. For example, I will split a curve in ten equal(or specified) pieces along its length. So I need X,Y,Z coordinates with respect to the origin for all eleven vertices which will be created after the splitting. Is that clear?

    https://cad.onshape.com/documents/ce3ffb7bcb1ad02727fd8f8a/v/fca607809a625ff979a5ff6c/e/4754bcbcfaef84b11e307910?renderMode=0&uiState=66311219f6b4b1085fbfdc56
  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 197
    Do you want to report the x,y,z coords to the FeatureScript notices? Or to a custom table?
  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 197
    Here's a quick (non-published) and rough example doc that extracts the coordinates at n divisions along a curve, and writes the x,y,z to a custom table. The table collates all the points from previous "Extract along curve" features... (incase why you were wondering why there are 139 points listed in the table!)




    There's an alternative version in the same doc that extracts the control points of the spline (or spline approximation) and writes the x,y,z to a custom table. The bridging curve shown below is G2/G2 hence the 6 control points as seen in the table.


  • Enes_HIZLIEnes_HIZLI Member Posts: 9
    These are more than enough. Thank you so much!
Sign In or Register to comment.