@Jim. first of all, thanks for the reply.
I will try to be straight in my explanation:
When opening SketchUp:
- DC parent name: Cabinet
- DC child name: Door
- custom variable name: door_gap
- door_gap value: =0.3
- custom variable name: door_thickness
- door_thickness value: =1.5
- X axis value: =Cabinet!X+Door!door_gap
- RotZ value: 0
OnClick Event:
- ANIMATE("RotZ",0,-90);
- ANIMATE("X",Cabinet!X+Door!door_gap,Cabinet!X+Door!door_gap+door_thickness)
PS: the first animation works fine, as the second one. the problem happens when the second animation runs and change the X axis value, which was previously set to "=Cabinet!X+Door!door_gap". now it toggles between two numeric values (as result the two formulas).
when I finish the INTERACT mode and resize the cabinet, now, it doesn't resize properly because X axis value is not a formula anymore but a numeric value.
as a try to overcome this situation, I created another custom variable called "pos_X" (text type) and changed OnClick code, as follows:
- ANIMATE("RotZ",0,-90);
- SET("pos_X",IF("RotZ=0","=Cabinet!X+Door!door_gap","=Cabinet!X+Door!door_gap+door_thickness"))
PS: pos_X receives the right formula in text format. now, I need to know how to interpret this formula and send the value to X axis, in numeric format.
any idea?