Illustrator RulerUnits returns Unknown for 'Feet' and 'Feet and Inches'
Illustrator recently added 'Feet' and 'Feet and Inches' to the available ruler units; however, when a user selects one of these units, the scripting side returns 'RulerUnits.Unknown' for 'activeDocument.RulerUnits'.
For scripting, the corresponding 'RulerUnits.*' value should be added so that developers can respond to the selected units.
I am happy to share that we have fixed this bug in our latest release – 27.1.1 which is available worldwide now.
Going forward, our goal is to fix as many top User-Voice bugs as possible and as frequently as possible. Given the nature of the fixes, some of the bugs will take a longer time to fix, but we are on it.
You can update to the latest release using Creative Cloud desktop App: https://helpx.adobe.com/in/creative-cloud/help/creative-cloud-updates.html
Thank you for all the feedback. Keep it coming!
Ankit Goyal
Illustrator Team
-
[Deleted User] commented
3 years of not paying attention to the problem, but it is better to use tricks and create scripts than to wait another 3 or more years. =)
-
Adam DeHaven commented
The better workaround would be if Adobe could simply update the enum…
-
[Deleted User] commented
New units were added in CC 2020, but the ExtendScript API still doesn't know about them.
Workaround: 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. -
Adam DeHaven commented
Also impacts Meters
-
Adam DeHaven commented
An update on this: There appears to be a bug where some of the user selectable RulerUnits types are not included in the ESTK DOM.
The RulerUnits (the screenshot below is from the ESTK app) that are available to ExtendScript in AI 2022, are these: