BIM Coordinator Program (INT) April 22, 2024

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

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

Layers 1..16 in GDL 2D preview: what for?

Sam Karli
Enthusiast
Hi,
there are layers 1..16 in GDL 2D preview, but I cannot use them at all and seemingly the docs about them is quite "compact".

At first it mentions that you can call the separate layers as macros ("A rétegek különösen hasznosak a jelkép részleteinek csoportosítására és ismételt felhasználására (ilyenkor mindegyik réteg makróként viselkedik). Rajzoljon egy ábrát a 2D-s leírás-ablakban a rendelkezésre álló grafikus eszközökkel, majd hivatkozzon erre az ábrára a rétegszámmal a GDL 2D-s leírásban.")

I tried to use it like
call "1"
or something but id didn't work.

The GDL Reference Guide doesn't seem to know about it.

Is it work, is there a material about it?

My goal is to have a GDL object that has different visibility on the containing story and the above stories (but to achieve it with only by drawing and not by coding much). Is it possible?

Thx.
GDL/Python/C++ dev
14 REPLIES 14
Barry Kelly
Moderator
You don't use "CALL" for the layers like you would a macro.
You want the FRAGMENT2 command where the 'fragment_index' is the layer number.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
DGSketcher
Legend
You may find this page and the rest of the site useful...

http://gdl.graphisoft.com/gdl-docs/gdl-guide/chapter-5-2d-shapes/binary-2d/
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Sam Karli
Enthusiast
Thanks for the answers, these solved the problem.

One more question:
I control the visibility of the object (a staircase) through GLOB_CSTORY_ELEV and GLOB_HSTORY_ELEV variables in order to show it on some storys (since settings allow only current and current + 1; I would need up to current+2 stories).

Is there a solution not using elevations (that can be affected if story heights change) bur stories?
GDL/Python/C++ dev
Anonymous
Not applicable
Where can i find the layers to use with Fragment2 ? I am on version 20 and i dont see those 16 buttons in the GDL editor...
Laszlo Nagy
Community Admin
Community Admin
If you open the 2D Symbol Window in the Library Editor, that is where you can draw the various FRAGMENTS of the GDL Object's 2D. You can use the Fill, Line and Arc/Circle Tools. When you select any of these Tools you will see that the Layer pop-up in the Info Box has these "Layer" 1 to 16. These are the FRAGMENTS you are looking for. Those Fills, Lines and Arcs/Circles can be placed on various FRAGMENTS and then you can use the FRAGMENT2 command in the 2D Script to decide which FRAGMENTS to display and how.
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
Barry Kelly
Moderator
Also you the layer dialogue (CTRL+L) to turn those layers on or off.

There used to be buttons to turn the layers on/off but in newer versions they are gone and you must use CTRL+L.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Thanks! I didn`t use this feature before but i am trying to learn the bascis of GDL object making. Where is the origin point/insertion point of the 2D Symbol? Is it the small X dot?
Barry Kelly
Moderator
Constantin wrote:
Thanks! I didn`t use this feature before but i am trying to learn the bascis of GDL object making. Where is the origin point/insertion point of the 2D Symbol? Is it the small X dot?
Yes that is the 0,0 co-ordinate.
You only need to draw in the fragment layers if you do not want to create code in the 2D script.

You can also minimise the 2D script window and the 2D symbol window so you can see them side by side.
Then you can select and drag what you have drawn in the 2D symbol window across to the 2D script window and it will automatically create the code for you.
Now you can safely delete what is in the 2D symbol window because you have the script for it.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
I tried to copy paste and it tells me there is nothing on the clipboard.
By the way, is it possible to generate a 3D script in the same way?

Edit
I also tried to select and drag it but couldn`t get a code
copy_paste_2d.jpg
Learn and get certified!