In a Sketchup model file the are various fields containing behavioral data for units and formats:
A SketchUp model created from the C SDK will by default contain both a UnitOptions dictionary and an optionprovider UnitsOptions.
The ModelUnits can be read directly off the model but not be set directly.
The UnitOptions dictionary contains both LengthUnit and LengthFormat.
The optionprovider UnitsOptions also contains both keys LengthUnit and LengthFormat.
To me it appears that ModelUnits is a readback from optionprovider UnitsOptions:LengthUnit.
However, the dictionary field LengthUnit and the UnitsOptions:LengthUnit does not appear to be linked.
Also, the dictionary field LengthFormat and the UnitsOptions:LengthFormat does not appear to be linked.
When I create a SketchUp file using the C SDK, and I want to control the behaviour when SketchUp opens the file, I use the optionprovider UnitsOptions keys LengthUnit and LengthFormat.
This appears to work correctly.
My question is: why does the UnitOptions dictionary exist by default. Reminiscence from earlier days?