License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL objects with adjustable materials

Anonymous
Not applicable
How do I create a GDL object where I can adjust the materials individually? The only way I know how to do it doesn't save the individual materials, and the only way to change material is to un-tic the "Use Object's Materials" box and choose a different material, but this changes the entire object.

Your help welcomed! Thanks!
12 REPLIES 12
Laszlo Nagy
Community Admin
Community Admin
Check the GDL Reference Guide:
You have to have a file called MASTER_GDLxxxxxxxxx.gdl
In the place of xxxxxxxxx you can put any characters so the name of the file will be e.g. MASTER_GDL-OfficeMaterials.gdl

This file must be loaded in the loaded libraries.
You can edit this file in Notepad, it is a text file, with the GDL extension.

In this file you can use any of the DEFINE commands of GDL to define fills, materials, line types, textures etc.
These DEFINE commands are covered in the GDL Manual PDF on pages 196-212

Their result is when you reload libraries and a library contains a MASTER_GDL... file, the content of the file is executed, and if there are those DEFINE commands, the attributes defined in the MASTER_GDL file will be added to the attribute set of the project.
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 very mutch laszlonagy and all the other people who replayed.
I am very new to GDL so this is very helpful. If its possible, can you post a example? It is a little bit easy for me to understand now in the beggining.
Thank you very mutch.
Laszlo Nagy
Community Admin
Community Admin
The examples are there in the GDL Reference Guide PDF.

I copied one example:

DEFINE MATERIAL "water" 0,
0.5284, 0.5989, 0.6167,
! surface RGB [0.0..1.0]
1.0, 0.5, 0.5, 0.9,
! ambient, diffuse, specular,transparent
! coefficients [0.0..1.0]
2.0,
! shining [0.0..100.0]
1,
! transparency attenuation [0.0..4.0]
0.5284, 0.5989, 0.6167,
! specular RGB [0.0..1.0]
0, 0, 0,
! emission RGB [0.0..1.0]
0.0
! emission attenuation [0.0..65.5]

Note that the lines starting with ! are comments.

So the real script is:
DEFINE MATERIAL "water" 0,
0.5284, 0.5989, 0.6167,
1.0, 0.5, 0.5, 0.9,
2.0,
1,
0.5284, 0.5989, 0.6167,
0, 0, 0,
0.0
So if you paste this into Notepad, save it as MASTER_GDL-1.gdl for example, then place this file into any of your loaded libraries, reload the libraries, the new material will be there among your materials.
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