0

Someone would have already used a code with power shell to extract the x and y positions in text file of different circles of the same illustrator file ? I tried with different codes found on this website but they don't work on power shell

6
  • is there any particular reason why you want it to be done in powershell? Also is there a particular reason why it needs to be put into AI trough code. I mean you can compse SVG, EPS, DXF or PDF directly too. What does the file look like?
    – joojaa
    Commented Oct 11, 2022 at 16:10
  • You could use ExtendScript within Illustrator and do something like this: graphicdesign.stackexchange.com/a/100961
    – Wolff
    Commented Oct 11, 2022 at 20:39
  • there isnt really any reason you couldnt use powershell. But rather its a bit pointless without knowing why one would bother to make a tool that strictly works outside of normal ecosystem for no benefit. The question then arises why bother going there if you dont know how to translate the VB api documentation to powershell yourself? And is that even on scope here? But yes i might answer if the question is sufficently motivating.
    – joojaa
    Commented Oct 12, 2022 at 5:01
  • @sbmae Yeah but thats not true at all. Illustrator comes with extendscript toolkit so all of the extendkit toolkit scripts work as is even if you dont have anything else. Also why dont you just export the file as dxf directly form illustrator no scipting involved.
    – joojaa
    Commented Oct 12, 2022 at 8:26
  • Why don't you just export to DXF then? Illustrator can export to DXF.
    – Luciano
    Commented Oct 12, 2022 at 8:48

1 Answer 1

1

No answer to the question, but your shown image is so simple and regular that you can easily calculate the coordinates of the circles one by one with a calculator or all of them at a same time with a spreadsheet.

Think a plane filled by a pattern of equal equilateral triangles. The circles are at the vertices of the triangles. If the X distance between the midpoints of adjacent circles on horizontal lines is 1 unit, the Y-distance between two horizontal lines is 0,866 units and the adjacent horizontal lines have X-difference 0,5

The 0,866 is actually a rounded version of the exact number. Instead of 0,866 use in your calculations the squareroot of 3/4. Use as many digits as your calculator gives for the best possible accuracy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.