BUG: Dynamic Component uses imperial even when cm & metric set everywhere

Just uploaded a dynamic component 4 leaf accordion / bifold door to the 3D w/h at:

https://3dwarehouse.sketchup.com/model/…/Accordion-4-leaf-door-for-patio-deck

This test works but highlighted an issue where it seems whenever you use absolute referencing in your code…

animate("leaf1!x",0,100)

…the units are interpreted as inches even though you have mm set as default in SU with cm also set in Dynamic Components.

If you don’t use absolute referencing…

animate("x",0,100)

…then it works as expected though obviously has limited use. Also you’ll never have a problem if you only use imperial which is why I guess D/C are mostly limited to imperial countries.

I can limp by working around this but it’s excessively painful… and took a lot of head scratching and testing to isolate the bug.

Yes, that’s a known issue. SketchUp’s internal database represents all coordinates using inches, regardless of the display units set in the model. It is up to the extension programmer to take this into account when creating a UI. Unfortunately, there are cases in which DC fails to do so.

1 Like

The bug is actually that dynamic components with centimeter units revert to inches when the “Display units format” is disabled in the Window menu>Model Info>Units dialog. If you use DC:s you have to keep it turned on.

Hi Anssi.

Nope, “Display units format” is checked/enabled. It looks like a (known) bug.

Thanks slbaumgartner, looks like I’ll have to contemplate working around it or giving up. :wink: