1 Reply Latest reply on Sep 24, 2015 10:58 AM by Silly-V

    How to change document units?


      I have some documents in Points that I want to set to Millimeters using a JSX script, then save them.

      I have tried the following code:


      var document = app.activeDocument;

      document.rulerUnits = RulerUnits.Millimeters;

      document.units = RulerUnits.Millimeters;

      After executing, the document (File > Document Setup > Units) and the ruler are still in Points.

      Is it possible to change the unit by script?

        • 1. Re: How to change document units?
          Silly-V Adobe Community Professional

          It is a read-only property, app.executeMenuCommand("switchUnits"); only throws a MRAP, changing units is non-recordable in Actions..

          What can be done? You can make a new document, set the preferences for your desired units and paste every object into it, or use AppleScript / VB or AHK to try and send keys and clicks into various menus, is about all I can think of.