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.


1 Like

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 https://www.youtube.com/watch?v=SZtNxSEtSJI&t=185s

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