Dynamic Component with possibility to choose perexample the doorhandle out of a list

I made a dynamic component of a frameless door.
I can change the size, no problem, I can animate it, no problem.
Now I am looking to integrate the possibility to choose from a list wich doorhandle and lock I want to see on the doorpanel and I want to change the Color of the doorhandles out of a list.

I don’t know what to setup in the Parent and in the subcomponents.
I there any toptutorial out there?
Here is the dynamic component in question.
XinnixDoors.skp (410.7 KB)

Use (for example) an IF statement like this in the Hidden attribute for each different handle:
IF(Parent!TypeDoorHandle = "ThisOne", FALSE, TRUE)
where 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.

Like this:
Colourparent.skp (35.1 KB)

Or maybe just allow the user to pick from the Material/Colour picker and apply them to the handle?

[EDIT]
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 Parent!TypeDoorHandle

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 DoorPanel.
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.
image

What’s the reason for that?

Hello John,
Thanks for looking into my DC.
I have been programming the choise of color for the fittings.
I will look into the choise (visibility) of the handleteype.
To give an anwer to your observation on the edges of the doorframe.
This is a framelessdoor with a frame which is to be plasterd into the walliopening.
So the wall opening is +7 cm in width and
3.5 cm in height in relation to the measurement of the doorpanel.
So the plastered in doorframeprofiles have to be integrated into the wallopening. So connecting edges in wallopening and frame edges have to be made as hidden geometry.