How accessing Model attribute from Components?



I will like to setup a “Main Variable” (Attribute in a Dictionary in my Model)
And use this Attribute in few Components…
Ex.: I will like to change the “Material Thickness” for all bottom part in all Dynamic Components

   LenZ =Model!{DictionaryName}!{AttributeName}

Thank you!


The only simple way I know of to do this is to wrap all your DCs in a parent component, and take all your parameters which are common to all the separate components from the parent Component Options and attributes.

Other people who know much more about DCs than I do may be able to suggest other ways of doing it, though.


You can make a ‘swatch’ component (just some geometry) and add attributes to them which can be used by other components. DC can read attributes of other groups/components which are: one level down , same level, or one level up. Consider the Model to be the top level (=level 0) and residing components level 1, the nested components in level 1 components are level 2 , etc.

This means that for instance level 5 components should somehow ‘inherit’ attributes from the higher levels ( where 0 is top and 1,2,3, etc is going down) This can be done with PARENT!
If you name the swatch component Global (SketchUp doesn’t like components with the name Model…) and let it reside in level 1, all level 1-2 components can use Global!BottomMaterialThickness.
The lower nested components can use PARENT!BottomMaterialThickness. Provided that you would redraw the DC…

Have a look at this file:

Global.skp (340.5 KB)

Attribute Scope

Thank you!

I figure it out!
The problem I had is I didn’t know SU can only access 1 level…


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.