Units in a SketchUp model and faces with short edges

More wasted time ...

I think that this was an early convenience “shortcut” function (perhaps used by the online 3D Warehouse to quickly get the user units of a model for online display.)

There is an issue in that it uses a “forgotten” enum that was not updated when yards was added as a new user unit.

I do believe that querying the options manager should be safer as it uses it’s own enum for the units.

I filed an API Issue on this a year ago

enum SUModelUnits lacks a member for the new yards unit · Issue #442 · SketchUp/api-issue-tracker · GitHub

… in which @tt_su said …

I’m leaning towards deprecating SUModelUnits and SUModelGetUnits as it appear to be redundant. Don’t want to bloat SUModel* further by adding functions for area and volume units. SUModelGetUnits is even asymmetrical, no setter.

If you have thoughts @tim, please add them to the open issue, and / or file a specific request in the GitHub API tracker for the model level setter method(s). But, I can say right now that it is unlikely to happen as there are multiple options that must be set in the correct combination in order to set the user units. (Basically the settings must match a valid setting in the GUI.) The Units Options manager can do this.

Example: When LengthFormat is Engineering, the LengthUnit must be Feet.

See also …

What's the right way to set unit of model with C API? - #4 by DanRathbun