cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

SYMB_MIRRORED in X or Y direction

Anonymous
Not applicable
Hi All,

I have a bit of a problem. I have an object that I need to look the same, no matter whether I mirror it in the X or Y direction

In my 2D script I have added the following script, which works well when mirrored over the X axis.

IF SYMB_MIRRORED THEN
MUL2 1,-1
ENDIF

However this will not work if the same object is mirrored in the Y axis instead

Is this a limitation of ArchiCAD, or just my ability
13 REPLIES 13
Laszlo Nagy
Community Admin
Community Admin
I seem to remember reading this somewhere in GDL documentation.
Basically you create an equation which evaluates to TRUE (1) or FALSE (0). I think it is also possible to create a numeric expression the result of which can be 1 (which will be TRUE) or some other value (which will be FALSE) - I am not totally sure about this part, that a non-1 value will be considered FALSE, so please test this if you use it.
But a simple use of this would be something like

If SYMB_MIRRORED THEN
....
Endif
So you would not have to write
If SYMB_MIRRORED = 1 THEN
....
Endif
This of course works best if the variable is a Boolean Type because its value is then always either TRUE (1) or FALSE (0).
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Anonymous
Not applicable
laszlonagy wrote:
I seem to remember reading this somewhere in GDL documentation.
Basically you create an equation which evaluates to TRUE (1) or FALSE (0). I think it is also possible to create a numeric expression the result of which can be 1 (which will be TRUE) or some other value (which will be FALSE) - I am not totally sure about this part, that a non-1 value will be considered FALSE, so please test this if you use it.
But a simple use of this would be something like

If SYMB_MIRRORED THEN
....
Endif
So you would not have to write
If SYMB_MIRRORED = 1 THEN
....
Endif
This of course works best if the variable is a Boolean Type because its value is then always either TRUE (1) or FALSE (0).
You are right László.
And generally we don't use for boolen type parameter eg:
SYMB_MIRRORED <> 1 or SYMB_MIRRORED = 0
we used to use:
not(SYMB_MIRRORED)


So the code is more understandable if you use eg SYMB_MIRRORED or not(SYMB_MIRRORED) for boolen type parameters.
rocorona
Booster
laszlonagy wrote:
I am not totally sure about this part, that a non-1 value will be considered FALSE,
In fact, all non-zero values are TRUE.
It will return a True value for any positive or negative value other than 0.
_________________

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
Laszlo Nagy
Community Admin
Community Admin
Thanks for the clarification, Roberto.
I was not sure about that, as I mentioned.
So 0 is FALSE, any other value is TRUE.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27