Find the next step in your career as a Graphisoft Certified BIM Manager!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

IF SYMB_MIRRORED.....THEN CHANGE PARAMETER

Anonymous
Not applicable
Hi All,

I've scripted a simple, office standard casement window. It works perfectly except for one thing. The user has the option to choose: Left, Right of Fixed as the opening direction. The problem is that if the window is mirrored it still shows the original opening direction parameter even though the opening line is correct. The script below shows an attempt to fix this but it doesn't work. Any thoughts?


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! OPENING LINE !!!!!!!!!!!!!!!!!
IF OP_DIR="Fixed" THEN END
IF OP_DIR="Left" THEN
ADDX A-7.5"
MULX -1
IF SYMB_MIRRORED THEN PARAMETERS OP_DIR = "Right"
ENDIF
ADDZ .25"
LIN_ 0, 0, 0, A-7.5", (B-7.5")/2, 0
LIN_ A-7.5", (B-7.5")/2, 0, 0, B-7.5", 0
IF SYMB_MIRRORED THEN PARAMETERS OP_DIR = "Left"

Thanks,
Doug
19 REPLIES 19
Anonymous
Not applicable
Hello Doug,
I did some checking and according to Laszlo Nagy
SYMB_MIRRORED does not work for doors and windows.
Please go to this link and read what is said about SYMB_MIRRORED.
http://www.archicadwiki.com/Global%20GDL%20Parameters?highlight=%28CategoryGdl%29
Peter Devlin
Anonymous
Not applicable
Hello Doug,
You might be able to use WIDO_ORIENTATION.
See what Laszlo Nagy has to say about WIDO_ORIENTATION
in the same link I posted earlier.
Peter Devlin
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Peter wrote:
...according to Laszlo Nagy SYMB_MIRRORED does not work for doors and windows.
SYMB_MIRRORED is used in doors and windows to determine the exact placement method. Refer the Positioning chapter of the Window-Door scripting doc of the Technical Standards:
http://www.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/13/LibDevGuid...

(it can be found starting from the permalink of Basic Library Documentation: http://www.graphisoft.com/support/developer/documentation/LibraryDevKit/ )
Peter wrote:
Please go to this link and read what is said about SYMB_MIRRORED.
http://www.archicadwiki.com/Global%20GDL%20Parameters?highlight=%28CategoryGdl%29
This document should be updated!

Regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
ztaskai
Graphisoft Alumni
Graphisoft Alumni
4thorns wrote:
I put: IF SYMB_MIRRORED THEN END in the master script and it seemed to work..nothing but an empty hole in the wall. So I tried this in the master script:
IF SYMB_MIRRORED THEN 
	IF OP_DIR="Left" THEN OP_DIR="Right"
	PARAMETERS OP_DIR="Right"
ENDIF
IF SYMB_MIRRORED THEN 
	IF OP_DIR="Right" THEN OP_DIR="Left"
	PARAMETERS OP_DIR="Left"
ENDIF
...
Still no luck.
Look into the related chapter of GDL Technical Standards:
http://www.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/13/LibDevGuid...

(it can be found starting from the permalink of Basic Library Documentation: http://www.graphisoft.com/support/developer/documentation/LibraryDevKit/ )

It defines the cases when parameters script is run. Mirroring goes in the "NOT run" row beside drag - by analogy. If you think about it, the current way is the coherent logic for all situations.

Consequently, setting any parameter according to SYMB_MIRRORED will take effect only when you open up the settings dialog of the object and close it with OK.

I don't know a good way to show the mirrored/not-mirrored information in the listing. ArchiCAD Library windows have an other way to mirror the sash - by having an actual opening type parameter which can be set by the user.

Regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Laszlo Nagy
Community Admin
Community Admin
I am sorry to say that that document in ArchiCADWiki is rather old, so I would rather trust the GDL Technical Standards documentation.
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
Thank you for all your replies. Zsolt, those links were quite helpful in understanding how doors and windows work. After I read them I placed several windows just to see how they were placed based on curser placement. I soon discovered something I did not know I knew that curser placement determines swing direction when placing doors...done it a thousand times. What I didn't realize is that the same thing happens with windows with horizontal opening directions. I used it on AC windows and then tried it on mine. A simple opening direction line scripted in 2D changed depending on the side of the window I was on (left or right). This makes it quite easy. I'm kind of embarrassed that I never figured this out before!
Erich
Contributor
4thorns,

On Oliver Detan's site, http://pagesperso-orange.fr/archilib.od/, he has a set of windows that has all the options displayed in the 3D model as well as a GDL generated text in 2D showing what the settings are (including SYMB_MIRRORED if I recall correctly). It is a useful bit of code for developing you own opening objects and is easily adapted. You should check it out.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Ben Cohen
Enthusiast
ztaskai wrote:
Consequently, setting any parameter according to SYMB_MIRRORED will take effect only when you open up the settings dialog of the object and close it with OK.
I have noticed in my latest window that SYMB_MIRROR will not work in the UI script. I have a window that displays its shape in the UI, if the window is mirrored the UI display needs to mirror as well, but it will not. It does not matter if you open the window and change a parameter, SYMB_MIRRORED has absolutely no effect AFAIK. I have had to resort to a 'Mirror' button but it really should not be required at all.This is very annoying.....
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Ben wrote:
I have noticed in my latest window that SYMB_MIRROR will not work in the UI script. I have a window that displays its shape in the UI, if the window is mirrored the UI display needs to mirror as well, but it will not. It does not matter if you open the window and change a parameter, SYMB_MIRRORED has absolutely no effect AFAIK. I have had to resort to a 'Mirror' button but it really should not be required at all.This is very annoying.....
Hi Ben,

It's really strange. I just tested the situation in v12 and in v13 with the following script line:
ui_outfield SYMB_MIRRORED, 1, 1
I get the proper 0 and 1 values printed - as real numbers of course.

Did I misinterpret your problem?

Regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Ben Cohen
Enthusiast
Whoops, just had a real head slapping moment . I should of been using WIDO_ORIENTATION for what I was after. Sorry to waste your time.....
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au