Dynamic Component sliding 3 pane glass door, using OnClick to slide nested component doors simulateously won't work properly

Hello everyone, I’m new in dynamic components and I’ve been having problems making a 3 pane sliding glass door that can slide all 3 panes in both directions. Could anyone explain why the X value on the OnClick is not proportional to the main LenX? I managed to get the desired result on the video I’m uploading by trial and error but still can’t scale. Thanks!!


PS: I erased the audio on the vid

You will get a more helpful answer if you can upload your model here. If it is less than about 15MB drag and drop the .skp file into your post. Or use the 8th icon to upload it.

Here’s the file. I´m working on some windows too but nothing was hard to figure out except this one. Thanks for your help! ventanas escalables doble giro animado.skp (1.9 MB)

I would guess because LenX is not used in the animate() formulae.

Normally the door frame remains the same width, even for wider doors. So the slide motions would be DoorWidth - (FrameWidth * 2) / 3.

(Perhaps your DoorWidth is your LenX ?)


By the way, the blaring rock music in the animation was uncalled for.

Oops! I’m deeply sorry for that!
The thing about the proportion that I can’t figure out is that, if I translate to numbers the formula, and isolating only the blue window for this example, the frame is 8 units width, but if I input the 8 units, it moves way more than that. Thats why the first formula says 3.1, instead of 8. normally the formula would be something like: (frame width,frame width, main lenx - framewidth - (doorwidth*1.1),frame width).
I´ll try a few variations of what you said but always messes up the scaling because the formula is only working for that particular scale.