HI
the hinges are on the left and the front goes over the corp..if I change the hinges to the right I want the difference to move to the left..is it possible if I use “otvaranje”?
In a well-written macro, the hinges will automatically change position depending on the opening orientation. This means that there is a variable that reads the orientation of the front.
Therefore, in this example, such a variable should be used.
Since the position of the front can only be changed externally, the parent element should read the value of that variable and change the x position of the front accordingly.
Example
Let’s say we have an element called “Cabinet”.
We also have a door element called “Door1”.
Naturally, “Door1” is inside “Cabinet”.
Let’s call the first panel inside the door “Face”.
In the “Door1” element we need to have a variable that will read the opening direction.
Let’s call it “SideOpen”.
The formula is:
SideOpen=Face.tipfronte
Results can be 1 for right opening or 2 for left opening.
In the main element “Cabinet” you should put the formula for the x position of the door, which will read:
door1.x=if(door1.sideopen=1;2;-50)
For those who have a hard time reading oneline if statements, here is the “translation”:
IF sideopen=1 THEN door1.x=2
ELSE door1.x=50
I assumed that 2 mm is the distance of the door from the edge and that 50 mm is the extension of the door.