Skip to main content
Inspiring
October 28, 2022
Question

How to set Illustrator's units to mm?

  • October 28, 2022
  • 1 reply
  • 756 views

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`

 

This topic has been closed for replies.

1 reply

Community Expert
October 28, 2022

Document object has a units property of type RulerUnits. You can try setting it to the desired value

-Manan

-Manan