DC - onclick function - position update problem

I would like to ask for help. I have almost completed the dynamic component of the sliding casement window. I’m using the onclick function here for the wing to move the wing to the open and closed position.
I also added the possibility of changing the dimensions with the SCALE tool with the limitation of the planes of action.

Problem: after resizing via SCALE, wing position does not update with onclick function. To restore the position, you need to click again with the tool to update the new position. Is it possible to treat this?

I am attaching the component.
HS Portal DC 1.skp (726.0 KB)

HS Portal DC 1.skp (721.8 KB)

i think it works now

you are my hero. This is exactly what I needed!
I’m looking at your edit - could you just give me a really brief description?
Only the sliding door leaf in the onclick function was modified and the two attributes “change” and “check” were added?

Thank you very much indeed, I have been struggling with this for a long time!

initially I did the onclick change, then realized that the door could be oversize for the frame, so added a max value for this in the parent

an explanation for onclick, I split the X value to calculated position based on door size and the change the onclick movement, check to value open or closed

Thank you very much for your reply, I have to admit that I was a little worried yesterday before I got it all figured out. I found a tutorial video for this problem: https://www.youtube.com/watch?v=UAfchXqU2_o&t=77s. In the end, it’s that simple.

It’s very nice to know that there are people around SketchUp who are happy to help. I wish you good luck and a beautiful day!

1 Like