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

Instantiate a 3rd party object into an own "Layout object"

Anonymous
Not applicable
Hi.
This is my first GDL script.

I am trying to instantiate a Toilet, Bidet, and Shower into a "Badroom Layout" Object.

I want to invoque already created Toilets, Shower and stuff into the Layout object.

Do you know what is the function name?

Thanks in advance !!
4 REPLIES 4
Anonymous
Not applicable
Weird of GDL to have called "Macro" to an "Object" or "Class"

macroToilet = "WC 20"
CALL macroToilet PARAMETERS      ! use parameter default values
CALL "leg" 2, , 5  !!!!! A = 2, B = 0, C = 5
Laszlo Nagy
Community Admin
Community Admin
jacobidiego wrote:
Weird of GDL to have called "Macro" to an "Object" or "Class"

macroToilet = "WC 20"
CALL macroToilet PARAMETERS      ! use parameter default values
CALL "leg" 2, , 5  !!!!! A = 2, B = 0, C = 5
This is for historic (legacy) reason.
A long time ago GDL macros were not GDL Objects. They were simply 2D, 3D, etc. GDL scripts and a GDL macro file had the *.GDL extension.
Then a new capability came in GDL, which was that you could now call another GDL Object (*.GSM extension) as a macro. If you called it from the Master Script, the Master Script of the macro was called; if you called it from the 3D Script, the 3D Script of the macro was called, and so on.
But the GDL syntax remained, only its capabilities were extended.
So that is why this seems a bit strange now.
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-Ac28
Anonymous
Not applicable
Thanks laszlonagy !!

Any Hint to have a Parameter defining a Macro?
I mean, one thing about classes is that the keep the properties naming and structures.

In GDL, once I CALL a Macro I don't have access from properties to setup the called Macro. As much as I looked, I found most GDL code setting all up with duplicated parameters.
Anonymous
Not applicable
jacobidiego wrote:
...In GDL, once I CALL a Macro I don't have access from properties to setup the called Macro. As much as I looked, I found most GDL code setting all up with duplicated parameters.
Maybe about it:
CALL "leg" PARAMETERS A=2, B=0, ZZYZX=ZZYZX, alpha=Param_1, beta=Param_2, gs_cont_pen=Param_3, gs_detlevel_3D=gs_detlevel_3D, gs_resol=gs_resol -!!!- All the necessary parameters

Param_1 etc - The parameters of your element, controlling the macro parameters.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!