Skip to main content
Participant
July 16, 2023
Question

Export of object co-ordinates via SVG in document units (e.g., millimetres)

  • July 16, 2023
  • 1 reply
  • 231 views

I'm trying to find a way to export the co-ordinates and dimensions of 100s of objects within an illustrator file.
In other software packages, one way of doing this was to export as SVG and set units to something relevant for the scale of object in the drawing, and take all the information from SVG file. It seems there is no way to do this in illustrator and that any co-ordinates are only available in pixels/points. Ideally being able to have some way of a list of object name, x, y, height and width, with x and y relative to the ruler position, and height and width in the same units would be ideal. 

(See a relevant post I made on stack exchange from this here https://graphicdesign.stackexchange.com/questions/161647/adobe-illustrator-export-list-of-positions-and-dimensions-of-vector-objects-wi )

Is there an existing way to do this in Illustrator or a plug-in that I've missed? (CSS export also has same units issue). Script solutions (e.g., this , also seem plagued by this, only outputting things in points. But perhaps some better scripters out there can figure this out! 

This topic has been closed for replies.

1 reply

Legend
July 17, 2023

I feel this can be written well in ChatGPT, it is relatively simple. You try it. It would be faster to teach the conversion of units. Here is an example.

var number_pt = 10 ;
var number_mm = new UnitValue(number_pt, 'pt').as('mm') ;
// --> 3.52777777777778
alert(number_mm) ;