We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

GDL Beginner : window questions

Anonymous
Not applicable
Hi guys !

I've been using archicad for quite a time so I decided to start learning GDL.

I decided to create a frameless window as exercise and to not start from scratch, I modified the Curved Window 19.
As of now, the window works fine, I can divide it horizontally and vertically but I still have some questions:

1) there is a lot of calls to external functions like
call "GS Window Functions"
call "FM_types"
call "ui_tabIDlistHierarchy_m"
is there more documentation about these function and is there a source code for it ? (to try to get what they are doing internally and how it's done)

2) I don't really get the UI part and it's not straight forward to understand what are the available default panels and if there is a way to modify them without rebuilding it from scratch.
ex: remove the Frame Surface from the model attributes List
! --------------------------------------------------------------------------------
! Window Settings and Opening Model Attributes
! --------------------------------------------------------------------------------
"pageCallWinModAttributes":
	call "ui_WinSettOpeningModAttr_m" parameters listFieldWinOpSettAttrID = listFieldWinOpSettAttrID,
										iWindowShape	= iWindowShape,
										bVentilationProfile	= 0,
										iWindowType			= 18,				! WIN_Curved
										gs_bLeftSLight		= 0,
										gs_bSLight			= 0,
										gs_UTrans			= 0,
										gs_UTrans_Div		= 0,
										gs_LTrans			= 0,
										gs_LTrans_Div		= 0,
										gs_sash_uniform		= 0,
										gs_panes_number		= 0,
										bOverride_MVO_3D	= bOverride_MVO_3D,
										or_bOplines3D		= or_bOplines3D

return
If you have some solutions for that.

3) About the schedule.
a)Is there a way to easily annotate the drawings from the GDL script ? I'd like to have automatic dimensions for my panels. The attachment is made with the "annotate" tool of the schedule. I know how to check if I am drawing in the Schedule :
IF GLOB_CONTEXT = 6 THEN !Schedule 
	iLoD2D = SCALE_50
ENDIF
but I don't know how to draw dimensions objects. I think I can make it work with lines, but quite more complicated.
b) any idea on how to make it work in the elevation view of the window ?

Thank you for your help

Sched.jpg
10 REPLIES 10
Laszlo Nagy
Community Admin
Community Admin
Voulz wrote:
Hi guys !

I've been using archicad for quite a time so I decided to start learning GDL.

I decided to create a frameless window as exercise and to not start from scratch, I modified the Curved Window 19.
As of now, the window works fine, I can divide it horizontally and vertically but I still have some questions:

1) there is a lot of calls to external functions like
call "GS Window Functions"
call "FM_types"
call "ui_tabIDlistHierarchy_m"
is there more documentation about these function and is there a source code for it ? (to try to get what they are doing internally and how it's done)
Those are macros calls, when an object calls another object. ARCHICAD Library uses macros extensively. For example, all Door and Windows objects call many macros to create various portions of their geometries. Select the name of the macro in quotation marks, and press CTRL+SHIFT+O to open it.
2) I don't really get the UI part and it's not straight forward to understand what are the available default panels and if there is a way to modify them without rebuilding it from scratch.
ex: remove the Frame Surface from the model attributes List
! --------------------------------------------------------------------------------
! Window Settings and Opening Model Attributes
! --------------------------------------------------------------------------------
"pageCallWinModAttributes":
	call "ui_WinSettOpeningModAttr_m" parameters listFieldWinOpSettAttrID = listFieldWinOpSettAttrID,
										iWindowShape	= iWindowShape,
										bVentilationProfile	= 0,
										iWindowType			= 18,				! WIN_Curved
										gs_bLeftSLight		= 0,
										gs_bSLight			= 0,
										gs_UTrans			= 0,
										gs_UTrans_Div		= 0,
										gs_LTrans			= 0,
										gs_LTrans_Div		= 0,
										gs_sash_uniform		= 0,
										gs_panes_number		= 0,
										bOverride_MVO_3D	= bOverride_MVO_3D,
										or_bOplines3D		= or_bOplines3D

return
If you have some solutions for that.
I would have to get deep into the code to answer that, sorry, I don't have that much time now.

3) About the schedule.
a)Is there a way to easily annotate the drawings from the GDL script ? I'd like to have automatic dimensions for my panels. The attachment is made with the "annotate" tool of the schedule. I know how to check if I am drawing in the Schedule :
IF GLOB_CONTEXT = 6 THEN !Schedule 
	iLoD2D = SCALE_50
ENDIF
but I don't know how to draw dimensions objects. I think I can make it work with lines, but quite more complicated.
b) any idea on how to make it work in the elevation view of the window ?

Thank you for your help
I think you will have to do it with lines and Text because there is no Dimension command in GDL. Actually, you could write a Dimension macro that would take all the parameters a usual linear dimension element takes, and call that multiple times, passing parameters in time, to create dimensions in a schedule.
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
Hi laszlonagy and thank you for your answer, for helpful.
Those are macros calls, when an object calls another object. ARCHICAD Library uses macros extensively. For example, all Door and Windows objects call many macros to create various portions of their geometries. Select the name of the macro in quotation marks, and press CTRL+SHIFT+O to open it.
I think I can now be able to answer most of my questions with that.
I would have to get deep into the code to answer that, sorry, I don't have that much time now.
I'll check by opening the macro, it might get me the answer
I think you will have to do it with lines and Text because there is no Dimension command in GDL. Actually, you could write a Dimension macro that would take all the parameters a usual linear dimension element takes, and call that multiple times, passing parameters in time, to create dimensions in a schedule.
It is what I thought. I'll try it and come back if I have questions.
Could you just tell me how to create a Macro ? just a basic sample would be enough. I don't really get where to create it and how to add it to an object.

4) Then I'll add my actual concern with the Corner Window that I could be able to answer by checking the source file.
When you add a corner with a corner Window, the size of the wall hole is getting bigger but the size of the window is staying the same. I'd like the opposite way of working, combined with a 2D Hotspot to change the value of the angle.
My actual problem with it is that some Hotspots are automatically drawn by Archicad, that are the size of the wall hole. I am able to draw again the wall hole by myself but I don't know how to get rid of these automatic hotspots.

Thanks for all !
Frameless.jpg
David Maudlin
Rockstar
Voulz wrote:
Could you just tell me how to create a Macro ? just a basic sample would be enough. I don't really get where to create it and how to add it to an object.
A Macro is just a library part that is Called by other parts. Create a new object, then in the Details pane of the library part window, uncheck the Placable option, so the macro will not be visible in the Library Part's Setting dialog box (so users will not try to use the macro by itself). In the script of the main (calling) library part use the Call command to call the macro and set its parameters (see the GDL Reference Guide for more information). The macro must be in one of the loaded libraries, in most cases a separate sub-folder is created to place the macros for easier organization of the library.

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Erich
Booster
As a general recommendation, especially if you are just getting your feet wet with GDL, I would not start by trying to modify a Graphisoft window. They are fairly complex and at times baffling. You will probably have an easier time of it looking at a simpler window first.

However, if you wish to removed the hotspot in your item #4 then you only need to find it. You can search the GDL code for the HOTSPOT2 command and comment it out (place and exclamation mark at the front of the command like this ==> ! Hotspot2 x, y) and then see if the offending hotspot has disappeared. This could be a bit of a hunt as the command could come from the main object or any of the macros as well.

Another place to check, although I don't think this occurs in the standard library windows, is that the hotspots are not placed in the 2D symbol window and then called with a FRAGMENT2 command.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Anonymous
Not applicable
Hi guys,

Thanks for all these answers. I am busy at work these days, reason why I am slow to go back to you.
A Macro is just a library part that is Called by other parts. Create a new object, then in the Details pane of the library part window, uncheck the Placable option, so the macro will not be visible in the Library Part's Setting dialog box (so users will not try to use the macro by itself). In the script of the main (calling) library part use the Call command to call the macro and set its parameters (see the GDL Reference Guide for more information). The macro must be in one of the loaded libraries, in most cases a separate sub-folder is created to place the macros for easier organization of the library.
Thanks David, I was able to create some already. It also makes mo understand better how archicad is working with that.
As a general recommendation, especially if you are just getting your feet wet with GDL, I would not start by trying to modify a Graphisoft window. They are fairly complex and at times baffling. You will probably have an easier time of it looking at a simpler window first.
I am just looking for the part I know I want to change some behavior of Archicad. I also have background in programation and like to learn new things !
However, if you wish to removed the hotspot in your item #4 then you only need to find it. You can search the GDL code for the HOTSPOT2 command and comment it out (place and exclamation mark at the front of the command like this ==> ! Hotspot2 x, y) and then see if the offending hotspot has disappeared. This could be a bit of a hunt as the command could come from the main object or any of the macros as well.
My problem is more that I don't know how the basic hotspots are generated and how to get rid of them without changing the essence of the object.
I'd like to take rid of the two hotspots at the top of the window, but even by being the subtype of the most basic Window [Window (Wall)], all the hotspots are present. I don't know if I can get rid of it.


I have a second general question.

I checked the GS Corner Window, with no visible code in the definition, just new properties.
-If my Window is a subtype of GS Corner Window, the window check the angles of my corner and draw the hotspots in consequence.
-If my window is a subtype of Corner Window, the window doesn't check the angles (the angle properties are not defined by the definition, I had to add it myself), and draw the hotspots in consequence.

I can be the subtype of a Corner Window and call the GS Corner Window macro to draw it correctly, my question is more :
Where is the code of the GS Corner Window that moves the hotspots ? Is there any kind of hidden code?


Then a last question, Is it possible to link my window to another object ?
ex: linking to a door so it automatically creates a hole in the window
ex: linking to another frameless window to align the panels even if they are not the same size


As of now, I can answer most of my questions by checking the code of the other macro, which is really usefull.
Thank you guys for your help and understanding.
Window subtype.png
David Maudlin
Rockstar
Voulz wrote:
However, if you wish to removed the hotspot in your item #4 then you only need to find it. You can search the GDL code for the HOTSPOT2 command and comment it out (place and exclamation mark at the front of the command like this ==> ! Hotspot2 x, y) and then see if the offending hotspot has disappeared. This could be a bit of a hunt as the command could come from the main object or any of the macros as well.
My problem is more that I don't know how the basic hotspots are generated and how to get rid of them without changing the essence of the object.
I'd like to take rid of the two hotspots at the top of the window, but even by being the subtype of the most basic Window [Window (Wall)], all the hotspots are present. I don't know if I can get rid of it.
I took a quick look at this, and those hotspots might be built-in and cannot be turned off. I tried a window with zero then one Hotspot2 statement, and the corner hotspots remained. I then tried changing the parameter AC_Hole_Hotspot_Control (part of the Window (Wall) SubType) to zero, and still the hotspots are there. For Objects there is an option for hotspots on the bounding box, I don't see a similar option for Windows. HTH,

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Laszlo Nagy
Community Admin
Community Admin
David, I came to the same conclusion as you regarding the AC_Hole_Hotspot_Control parameter. No matter how I set it it had no effect on element hotspots.

There is a mention of it in the GDL Library Docs:

http://www.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/16/Window-Mac...
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
Hi David and laszlonagy,

Thanks for checking. I will explain more why I want these hotspots to disappear, we might find a work around.

I'd like to add a Hotspot controlling the angle of the corner window. I am able to do it quite easily and it works fine. The problem is when this hotspot is matching the basic window hotspot. When i try to use it, it will use the hotspot of the window, and so change the length of my window instead of the angle. Perhaps there is a way to make my hotspot either in foreground or giving it a bigger priority.

I know I could just extend the radius of my angle hotspot but I am trying to avoid having an over-hotspot-ed object. This will be what I will do if we can't find something else.
Barry Kelly
Moderator
Voulz wrote:
I'd like to add a Hotspot controlling the angle of the corner window. I am able to do it quite easily and it works fine. The problem is when this hotspot is matching the basic window hotspot. When i try to use it, it will use the hotspot of the window, and so change the length of my window instead of the angle. Perhaps there is a way to make my hotspot either in foreground or giving it a bigger priority.
But then what happens then when you want to adjust the length but not the angle?
You won't really win that one.

Just change the hotspot radius - that is the best/easiest solution I have found.
You never want hotspots overlapping if you can avoid it.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11