BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
About building parametric objects with GDL.

GDL object with parametric label


I am creating an object using GDL and I would like to know if there is a way for me to insert a label in 2D with text linked to the material used in the object.

For example, if I insert the concrete material into the object, the label automatically updates and shows the "concrete" 2D text.
Is there a way to do this via GDL?


Thank you in advance


@rodlee94 , yes it's possible. You would need to request the name of the material and use it with the text2 command.

So if you select your concrete material from a parameter named "materialParam" for example it would go like this :

n = request("Name_of_material", materialParam, name)
x = 0
y = 0

if n > 0 then
	text2 x, y, name


The request retrieves the name of the material in a variable called "name". If it can't retrieve anything then "n" is equal to 0 hence the if condition wrapping the text2. Then you can use the text2 command to display it in plan view with coordinates that you can set up the way you want.

Can I ask a question about "Name of material", the manual said it does not compatible with ac

20 above??


That is if you try to request the name of the material in the parameter or master scripts.

But if you request it in the 2D or 3D scripts, it should be fine.



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
Funfun Yan

I see, thank you!😀

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!