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.

-
[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: