Use (for example) an IF statement like this in the Hidden attribute for each different handle:
IF(Parent!TypeDoorHandle = "ThisOne", FALSE, TRUE)
TypeDoorHandle is the attribute selected in your drop down list in the Parent component, and
ThisOne is the component name for that handle.
[By the way, if you use
Parent instead of the default actual name of the parent component, your model will still work if you change the parent component name. It’s regarded as good practice to do that.]
Not sure about changing colour. Perhaps @pcmoor may be able to advise. He’s expert on DCs.
I find I did this in a older DC. Use the Material attribute, put a small (can be hidden) colour swatch in your DC, then have a colour picker drop down to select a colour - it must be a colour in the model.
Colourparent.skp (35.1 KB)
Or maybe just allow the user to pick from the Material/Colour picker and apply them to the handle?
Just tried my suggestion in your model. Doesn’t work, though I’m not sure why not.
To simplify your model, I moved all your handles in Outliner to be subcomponents of the Door component, not the Door Panel. That way, the handles’
Parent is the
XinninxSwingDoor_DC, and the selected door handle
TypeDoorHandle can be referenced as
I can’t get the Hidden parameter for the handle component to accept a formula. Whatever I enter, it reverts to FALSE, unless I explicitly set it to TRUE. [DOH! Forgot the = sign] Put that in, but it still doesn’t work.
Ah - it IS working, but by moving the handles ‘up’ in the component hierarchy, they are now appearing in the wrong place.
You have their X-values set as
= -DoorPanel!LenX + 7. I changed this just to
x=7 and they now reposition properly, and the IF condition in each handle’s
Hidden attribute now does what I thought is should!
Will finish editing all the handles and upload the DC shortly [Now DONE].
XinnixDoors_JWM.skp (799.9 KB)
You should now be able to do the same kind of thing for the locks.
OOPS. Further thought. You (correctly) had the handles as subcomponents of the DoorPanel. Now when I Animate the component, the handles stay behind because I made them subcomponents of the Door itself - mistake!
Got there in the end though.
I’ve now added an Attribute in the DoorPanel
TypeDoorHandle = Parent!TypeDoorHandle, and re-set the X-value of each handle to the value you had it before:
= -Parent!LenX + 7, only using
Parent instead of
XinnixDoors_JWM.skp (802.3 KB)
An observation: the edges of the door frame look odd - some are hidden, but not in a way that looks consistent to me.
What’s the reason for that?