Dynamic Components - Model units changing and not working

Hi there, first post on here so be nice :slight_smile:

I have just started to learn dynamic components but running into massive issues. I am following Welcome to Dynamic Components - Skill Builder on YouTube step by step. I have had issues on each video with elements not working, units changing for no reason. Could anyone shed light on if there are known bugs around using dynamic components in metric, i donā€™t use inches, so really want to be able to model and adjust in cm or mm. I am new to coding, but by following step by step on the video i havenā€™t done anything different, apart from not being in inches. Any help would be greatly appreciated. Thanks

Check the upper left of the nested Objects in the Component Attribute Panel. All should be set to CM (centimeter)
When you click on an attributeā€™s blue detail icon, set the the units to Centimeter, as well.
Bear in mind that formerly text is converted to an integer, so it might be an unexpected value.

ā€˜Current lengthā€™ formula is not converted right, you need to divide by 2.54. (Inch in cm)

1 Like

The implementation of metric in DCs in patchy, incomplete, and sometimes just buggy.

Make sure you are using the latest version of the Dynamic Components plugin, too.

Try to think in inches internally and use them in in calculations in the DC, and use CM only in user input and output fields. If you limit your use of metric units to the interface, and have your Model Info Units set to metric, most things will work.

That helped me, but isnā€™t always a complete solution either.

There are a few more tips in this old thread:

Note particularly the last post by Anssi:
AnssiSketchUp Sage

Jun '17

The DC code has a known bug (it has been there since they were introduced) where the metric units are recognized only when the ā€œdisplay units formatā€ checkbox is enabled in the Window menu>Model info>Units dialog. Otherwise everything reverts to inches.

Anssi

2 Likes

Which DC plugin are you referring too?
Iā€™ve just been doing them with native tools!
Is there an easier way?

It is the basic extension that ships with SketchUp, you can check the version in the extension manager.
Latest being 1.7

Actually the ā€œnativeā€ DC functions are a Ruby Plugin written by the SketchUp team and shipped with the application.

Got it.
Some times it is interesting to get something to do what you want it to.

Hi thanks for this, i have followed all of the points but still canā€™t get it to work, not sure if there have become further bugs with 2020 release? I will plug away at it and hopefully be able to shed some light on it if I am able to find a fix/work around. Currently I canā€™t even get basic functions to work on it, so it isnā€™t looking promising for me to learn DC, seems like maybe I am better to focus on another area of SketchUp and once they hopefully release an update with the bug fixes iā€™ll jump back into it. Thanks again for replying :slight_smile:

Try uploading where youā€™ve got to, (as a SU/.skp file) and Iā€™ll have a look. Canā€™t promise to fix it, and Iā€™m by no means an expert on DCs, but I have made several.

And if you can, provide a direct link to the video(s) you have been following.

At least I might be able to identify some places to look to see why yours isnā€™t working.

1 Like

Hi John, thanks for this, it really seems to have gone odd. You will see in my model that i have changed the text unit to CM, on the video it was set to ā€˜textā€™ but as per some of the other comments on the thread i tried changing this. Currently it wonā€™t even give me options in the attribute options box :face_with_raised_eyebrow:
I have tried to upload the model, first time doing this also, so just let me know if i havenā€™t done it correctly.
thanks DC - Model Bug.skp (166.3 KB)

sorry here is the video Welcome to Dynamic Components Part 4 - Skill Builder - YouTube

Quick look only, then I must go and make supper (7:30pm UK time here). Not had time to look at video yet.

Inside your parent Frame component you have a nested component FrameSize.

You need to give it attributes, and set them to the values the user entered.

Like this:

Then it works.
These are the Component Options for the Frame (parent) component, which you have set to display using the Attributes dialogue.

Hi John, this has fixed this issue, in the video it is slightly different but going over the steps just now it has worked, and unlike earlier today i am not getting random decimal values, but nice CM measurements :slight_smile:
I will push on with learning DC and hopefully you and the other can come to my rescue when i come up against issues again!
thanks everyone

Just encountered this bugā€¦ given up on waiting for LIVE COMPONENTS!

95% of the world operates on Metricā€¦ even NASA

Creating a DC for the mesh in my landscaping standard details, still in Covid-D lockdown and bored :slight_smile:

It is a bug that has been there since the DC feature was introduced. Everything reverts to inches when the ā€œdisplay units formatā€ box is unchecked in the units dialog. It is easier to circumvent now when we can dimension in LayOut. Our standard uses dimensions in millimeters without any units text.

The original SketchUp developers have been surprisingly ignorant of the way the world works. They chose a derived unit as the basis of the application while the base unit for all measurements, the millimeter, was ignored (the inch, too, is not defined as the width of an emperorā€™s thumb but as consisting of 25.4 millimeters).

1 Like

Having searched a bit, I have come across this as still being an issue. Itā€™s hilarious actually. If I set a DCā€™s ā€˜heightā€™ it always, no matter how I try to work around it, reverts to the inch value. I would have thought some basic programming here would have been refreshed - its been a ā€˜bugā€™ or ā€˜glitchā€™ for a few years nowā€¦

ho hum. I have to stick to fixing it all by dividing by 2.54.
nice.