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.

How to use GDL to get building material ID?

Anonymous
Not applicable
Hello everyone! How can I get the building material ID at GDL? Please give me help, thanks!



4 REPLIES 4
Laszlo Nagy
Community Admin
Community Admin
Try the following GDL command:
REQUEST{2} ("Building_Material_info", name_or_index, param_name, value_or_values)
Returns information in the given variable(s) on a parameter of the specified building material. Expression returns 0 and contains dummy return values
(emtpy string or 0) if used in parameter script, causing additional warning. Possible building material parameter names corresponding to parameters of
the building material definition:
param_name:
"gs_bmat_id": building material id
"gs_bmat_surface": building material surface index
"gs_bmat_description": building material description
"gs_bmat_manufacturer": building material manufacturer
"gs_bmat_collisiondetection": building material participates in collision detection (0 or 1)
"gs_bmat_intersectionpriority": building material intersection priority
"gs_bmat_cutFill_properties": building material cut fill properties (cut fill index number, cut fill foreground pen index number,
cut fill background pen index number)
"gs_bmat_physical_properties": building material physical properties (thermal conductivity, density, heat capacity, embodied
energy, embodied carbon)

Examples:

REQUEST{2} ("Building_Material_info", "Brick", "gs_bmat_id", id)
REQUEST{2} ("Building_Material_info", "Brick", "gs_bmat_surface", index)
REQUEST{2} ("Building_Material_info", "Brick", "gs_bmat_physical_properties", thermalConductivity, density, heatCapacity, embodiedEnergy, embodiedCarbon)
In AC21 it is detailed on Page 450 of the GDL Reference Guide.
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 laszlonagy help, I have successfully applied in the basic building structure, if it is a composite building structure is invalid.

this is my code,I wrote a label to get slab building material information.
REQUEST{2} ("Building_Material_info",SLAB_BMAT_NAME,"gs_bmat_id",id1)
REQUEST{2("Building_Material_info",SLAB_BMAT_NAME,"gs_bmat_man
facturer",id2)
REQUEST{2} ("Building_Material_info",SLAB_BMAT_NAME, "gs_bmat_description",id3)
LGreen
Booster
If you are scripting a label to read a slab composite, the data can be extracted using the parameters on p345-348 of the AC21 GDL guide.

In particular you will want to look at SLAB_SKINS_BMAT_NAMES. This is an array of all the Building materials in the composite.

The code can be as simple as;

TEXT2 0,0, SLAB_SKINS_BMAT_NAMES[1]

This will display the external / top material in the composite.
Lachlan Green | Architect | Drafter
AusBuild
AC23 & 25 | Windows 10 | Intel 11Gen Core i7 | 2.5GHz | 32GB RAM | Nvidia T1200
Anonymous
Not applicable
Is there a step by step tutorial on how all of this would be achieved?
I am currently using AC21 & AC22.
Learn and get certified!