Variables in dynamic components


Garage Door.skp (744.5 KB)
OK I’ve got another one for this community, which has been super helpful so far. I’m trying to animate an object along the Y axis by a value based on the LenZ value. All my formulas to calculate the variables work fine but my onClick animation won’t work if I have a variable in the first spot.

Working Example : ANIMATE(animY,500,closedPosition)
NOT working example : ANIMATE(animY,openPosition,closedPosition)

I know the values are correct but with two variables the closedPositon variable is either not being passed or is being changed along the way. Any thoughts? I’ve uploaded the component. As you’ll see when clicking on it rather then going back to the original position it moves backwards everytime.


the second move operation should be in its own wrapper, so not to move in the current context

garage tilt door.skp (754.8 KB)


There are just some errors in your calculations. This is what I ended up with:


Well my question didn’t really get answered but you guys did point out some goofs in my work and it’s now working as I wanted. Thanks so much. Still wondering about passing two variables to an animate function but that may be a mute point if I just build the component better in the first place.