Global Attribute value overiding Component Attribute forumula

Hi, Can anyone advise:

I have made a cabinet which is a Dynamic Component for which I want the option of adjusting the Plinth Height in 2 ways:

  1. Changing the attribute value for the component itself (using Component Attributes field)
  2. Using a ‘global’ value based on a separate component within the model (a swatch which has the purpose of custom global attributes which the other components refer to).

I have linked the ‘Plinth Height’ value to the Global value which works fine (using a re-draw tool to implement the change), however when I use the component’s own attribute option to change the value, it overides and deletes the formula for the Global value. So it also works but means I can no longer use the Global attribute to change it.

Does anyone know a way around this?

So I am thinking that maybe an IF statment could solve the problem, so In theory the following should work:

IF (Component!PlinthHeight>0,Component!PlinthHeight,Global!PlinthHeight)

use a dropdown with formula in the values for ‘Plinth Height’

Gobal … = gobal!pinth
Custom … = custom
100mm … =10
120mm … =12
150mm … =15

where custom is a fillable textbox


Thanks for that. I didn’t quite understand what to put where, although actually I don’t like the idea of having a drop down as the height can be quite specific (by millimeter)…

the custom would allow any other value unique to each DC

1 Like

separate hidden plinth height attribute

Plinth… = if(plinth_height,plinth_height, global!plinth)

so if the plinth_height text box <=0. then it will be the global

1 Like

There is a third way, using on click to get the options

for scale and global, textbox is hidden, using a set(), however as there are two “NONE”, used choose on additional attribute

example of the three methods

overwrote the first, so here is the amended file

global options.skp (77.6 KB)

1 Like

Thank you for the info, its really helpful, the code for the plinth attributes especially, I’ll give it a try…