Copy link to clipboard
Copied
My default Illustrators units is mm but after executicng a script the Illustrator's units are set in picas. So that when a new document dialog appears the units are picas there. How to set Illustrators's units back to mm at the end of a script?
The following does't work.
var units = 3; //(0 to 6)
app.preferences.setIntegerPreference("rulerType", units);
/*Unit list
0 : point
1 : pica
2 : inch
3 : mm
4 : cm
5 : H/Q
6 : px */
p.s. I had managed to do it when `units = 1`
Copy link to clipboard
Copied
Document object has a units property of type RulerUnits. You can try setting it to the desired value
-Manan