Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

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

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
AC24 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.14.6

Erich
Newcomer
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

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
AC24 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.14.6

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...
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

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 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Anonymous
Not applicable
Barry wrote:
But then what happens then when you want to adjust the length but not the angle?
You won't really win that one.
A Window has 4 hotspots to control the same value. One on each side is way enough to do that.
Barry wrote:
Just change the hotspot radius - that is the best/easiest solution I have found.
You never want hotspots overlapping if you can avoid it.
I am checking with other ways of modifying that angle, and overlapping hotspots are the main trouble I get with these ways. That's why I try to know if there is other solutions.

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!