Copy link to clipboard
Copied
Hello,
I want to use an Illustrator File that I exported as an SVG to follow a path, but I have issues with rescaling and finding the correct coordinates as this is not accurate enough.
Is there a way to export Illustrator files as an SVG (or another format that I can open as a text file) while keeping the units as millimeter?
Thank you for your help.
Best regards,
Michael
Copy link to clipboard
Copied
How are you saving your SVG file? Are you using the SVG option under the File>Save As command? Or are you using the Export For Screens dialog? Different options are available in the two dialog boxes.
Usually when SVG files are exported they'll use the units of measure of the Illustrator document. In document setup, change the units setting from Inches to Millimeters.
Generally speaking, path accuracy can be improved by bumping the default setting of 2 decimal places up to 3 or 4.
Copy link to clipboard
Copied
"Usually when SVG files are exported they'll use the units of measure of the Illustrator document. In document setup, change the units setting from Inches to Millimeters."
Don't think so. Illustrator measurements are based on Postscript points no matter what, so even if the Units are set to Metric, they will always be converted to points in the writing of a SVG file, or, in reality, with no setting whatsover, which means the SVG code will default to pixels as the measurement, e.g a box 100 points x 100 points will be assumed as 100px x 100px
The more important and deciding factor is what level of precision the file is exported as. Especially for scaling, it should be at least "4" (decimal places).
Copy link to clipboard
Copied
That's interesting. I was under the impression the SVG code would honor the dimensions in the Illustrator document. I'll occasionally have to export SVG files from Illustrator as vinyl cut-only jobs to output in Onyx Thrive. Apparently Onyx is just doing a good job of converting the points values back into inches.
Copy link to clipboard
Copied
Hi,
Thank you both for your quick answers. Im using the SaveAs command, but in my experience it doesn't matter what you use as Adobe allways saves SVG files in units/pixels. Which is in my opinion just unnecessary and it would be a great addition to have the option to export in millimeters, inches, etc.
I will try to export the file with more decimal places and see if this helps. 🙂
Copy link to clipboard
Copied
The precision level is key, whether it be pixels, points or mm. The default for SVG export is usually 1 (one) decimal place, which is far less precise than what Illustrator would save a vector as natively (usually 3 decimal places). The only difference between saving a file with a higher precision is the file size as the code would need to accommodate more "numbers", but SVG are basically text files and are not that heavy anyway, so it's a win/win to go at least 3-4 decimal places, which matches or exceeds the Postscript precision.
Copy link to clipboard
Copied
I tried the export with more decimal places and found another phenomenon.
A little example:
I have the origin and three paths as the following:
| X in mm | Y in mm | |
| Origin | 65,00 | 65,00 |
| 1. Path | 202,87 | 313,75 |
| 2. Path | 255,12 | 313,75 |
| 3. Path | 324,50 | 313,75 |
When I export the file as an SVG i get the following coordinates:
| X in units | Y in units | |
| Origin | 184,2519684 | 184,2519684 |
| 1. Path | 560,9028931 | 889,3721313 |
| 2. Path | 709,0128784 | 889,3721313 |
| 3. Path | 934,0153809 | 889,3721313 |
When I now try to calculate a scaling factor for X they differ greatly from path to path. This is an issue as I can't calculate diffrent scalings for every path.
Did I miss something or is there a formula how Illustrator exports coordinates to SVG Files. I will also attatch my .ai and .svg file.
Copy link to clipboard
Copied
When you set up your file in pixels as a unit, does it then match?
Also: how are the rulers set up? Document rulers or global?
Copy link to clipboard
Copied
Where can I check that?
Copy link to clipboard
Copied
The easiest thing to do is turn on the view of the document rulers (if they're not already visible). Click the Ctrl+R keyboard shortcut or go to the View menu and selecting Rulers>Show Rulers. Once the document rulers are visible, right click over a ruler to bring up a flyout menu. The menu will show various unit options as well as an option to change from document rulers to global rulers.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more