I’m currently learning how to work with dynamic components, and this issue has been keeping me busy for 3 days now. The problem isn’t too dificult imho, so I’m probably just missing something obvious.
I’m trying to animate a desk that’s adjustable in height (a rough recreation of Ikea’s idasen desk). When the desk is clicked, the top part and the mid part should move a different distance (while the bottom part stays in place).
I grouped two groups, “top” and “mid”, together in a group called “movable components”.
However, when I use the code “ANIMATE(“Top!Z”,0,27,-32);” in an onclick attribute for the group “movable components” (in order to get the “top” group to move when “movable components” is clicked), I get the message “ERROR: Invalid entity to animate: (Top!Z)”
Adjusting the code to “ANIMATE(“Z”,0,27,-32);” produces no error, but obviously doesn’t move the correct group. Of course, I could use that code on the “top” group, but then I would be able to make the “mid” group move on the same click.
I’ve tried turning the groups into components, typing in the code, copy-pasting the code, inputting the code by clicking on the relevant attribute, restarting sketchup, … No dice so far.
Anyone know what I’m doing wrong?
IDASEN.skp (329.9 KB)