I have a question.
I created a dynamic component (cabinet with drawers)
And I want to anymate the drawers.
But de component of the drawers will not take the attributes of the maincomponent (cabinet)
Can I fix that?OK_2POTL.skp (4.2 MB)OK_2POTL_With_animation.skp (4.2 MB)
They can only be manually animated with a mouse click.
How do you wish to animate them ? All at once or separately ?
If you wish to animate each drawer separately, then the main component must not have an onClick
attribute.
Each drawer subcomponent would then each have their own onClick
attribute.
We cannot know unless you add the DC file to the first post. (Use the pencil icon to edit.)
I prefer separatly
Thanks for the info,
I have able to do that, but the measurements will not scale when I adjust the measurements of the maincompontent⦠because the donāt link
I put the sketchupfile in the first post
Is there a way to link the subcomponent to the main component
Yes, you are using the top level DC name in a grandchild (kleinkind) component formula.
Nested DC objects can only see =parent!
(ouder) or sibling (broer of zus) objects.
To get attributes from grandparent (grootouder) you need to pass them down (geef ze door) to the parent (ouder) ⦠like passing genes (zoals passerende genen) ā¦
In grandparent "OK_2potl"
ā¦
voeg "=0.2cm"
In "Lade_Boven"
parent
ouder_voeg "=parent!voeg"
In "Lade_Deur_Boven"
grandchild (kleinkind) ā¦
X "=parent!ouder_voeg"
You also need to break down the sliding part and the fixed part of the runners(!)
You can create a separate component for all the parts of the top and lower drawer and add the āOnClickā to that or combine several āOnClickā formulas separated by ā;ā to the lade fronts only.
(Eg. OnClick=ANIMATE(āOnderdeel_boven_lade!Xā,0,-40,0) ; ANIMATE(āAnder_onderdeel!Xā,0,-40,0)