BIM Coordinator Program (INT) April 22, 2024

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

GDL
About building parametric objects with GDL.

DEFINE Attributes in a macro object

Joachim Suehlo
Advisor

I am having a great library of objects with Material-, Style-, Fill- Definitions that should be the same in all objects.
I have tested this with a macro, but more than one Material Definition does not work.
I do not want to define the materials in an Archicad template file, because out of the template the materials will be missing. I also do not want to use a master_gdl.gdl because I would like to prevent attribute pollution.
And having the same definition as an identical subroutine in 100 objects, is not an optimal solution.

Here is the script of the definition macro:

DEFINE MATERIAL "RA 7037" 4, 0.478, 0.478, 0.477
DEFINE MATERIAL "RAL 9022" 4, 0.522, 0.522, 0.513
mat_boden = IND(MATERIAL, "RAL 7037")
mat_korpus = IND(MATERIAL, "RAL 9022")
END mat_korpus, mat_boden

Here the Placing Object code:

CALL "DEFINE_MACRO" PARAMETERS RETURNED_PARAMETERS mat_boden, mat_korpus
ADDx 2
MATERIAL mat_korpus
BLOCK 1, 1, 1
DEL 1
CALL "AUSFUEHREN_MACRO" PARAMETERS mat_grau = mat_boden

Here the script of the external 3D Macro

MATERIAL mat_grau
BLOCK 1, 1, 1

All 3 objects attached for AC 27

Does anyone have a good solution?

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
2 REPLIES 2
Joachim Suehlo
Advisor

Additional Question: How does the object subtype "Surface material definition" work?
Could this be a solution for my request?

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
Peter Baksa
Graphisoft
Graphisoft

Attributes defined in a macro can't be used in caller scripts, only called ones.

"Surface definition" subtype is used in Surface Catalogs, the user has to import the materials he wants to use.

 

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Learn and get certified!

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!