Skip to main content
Sergey Osokin
Inspiring
December 17, 2022
Question

What's New in Illustrator Scripting CC 2023 v27.1.1 (December 2022)

  • December 17, 2022
  • 1 reply
  • 713 views

The RulerUnits list was fixed for units: meters, feets, feets & inches, yards. Uservoice.

 

Full list for activeDocument.rulerUnits:
RulerUnits.Pixels
RulerUnits.Points
RulerUnits.Picas
RulerUnits.Inches
RulerUnits.Millimeters
RulerUnits.Centimeters
RulerUnits.Meters
RulerUnits.Feet
RulerUnits.FeetInches
RulerUnits.Yards

 

In older versions of Adobe Illustrator, you still have to use tricks to define units. What I used: read activeDocument.XMPString and use RegExp to parse document units. Example from *.ai structrure: <stDim:unit>Yards</stDim:unit>. Another problem: until the document is saved, we can't know if the units have changed.

This topic has been closed for replies.

1 reply

m1b
Community Expert
Community Expert
December 17, 2022

Nice! Thanks for posting, Sergey.