Using onclick option in dynamic component

Hello,
I wondered if it is possible to use the onclick option in a way that it modifies another component state (hidden)

I mean:
Parent Component (Component 1;Component 2)
If I use on click on component 1 (which change its appearence), is it possible to hide the component 2.
I absolutely need those 2 components to be independant. The “on click” is applied to the component 1, not the parent.

In the picture you can see an architectural partition which has screen on it. When I “Onclick” the partition it is either plain, either transparent. I need the screen to be in hidden mode when the partition is transparent.
Best regards
:wink:

Attach the model itself as an skp file, for others to see how you set things up.
There may be a solution with tags being either turned on or off by clicking on the (parent) component.

Not at SketchUp now but basically you would create an on/off type parameter for the two options, set the visibility of the screen and wall objects to follow that parameter, and the onclick operation to toggle between the on/off states.

Hi, thanks for your answers
Here’s the example but less complicated attached
try onclick.skp (167.2 KB)


There are two components, the cube becomes a cylinder when “onclick”, I want the triangle to hide when the cube becomes the cylinder.
I need it to be an on click option, not a list menu, because the users aren’t really professional users of dynamic components.
And the triangle must not be “in” the cube/cylinder component.
:wink:

No computer, but for triangle

Hidden = if(parent!shape=“cylinder”,1,0 )

Just change the attribute name and value to suit.

1 Like

I got IT !
When editing the onclick “set” option, it has to modify a line in the parent component. So then when these lines are changing in the parent component, the component 2 can then hide, referring to a parent line modification.
I attach the file
Sorry for my english
try onclick.skp (166.8 KB)

1 Like