About building parametric objects with GDL.

GDL - Include the name of a surface in the parameters of an object


Hi all. I'm new to GDL subjects and I wonder if something I want to do is possible to achieve.


I need to create a 2D object that contain texts that come out of a surface parameter of my GDL object. Surface parameters in GDL I assume that mean only a surface index, and I couldn't find a way to "Get" the surface whole name and make a text out of it.


Surface names in my project follow this convention: "01 | WALL | BOARD FORMED CONCRETE WALL". I want to create a GDL object that contain such surface parameter and is able to print out substrings of that text, in that case "01" and "BOARD FORMED CONCRETE WALL". It should look something like this:


If anyone is able to give me some directions, I'd be very thankful! 😊

Architect / BIM Manager at Ideia1 -
Archicad 26 / Windows 10 64

Since the string parts I'm using follow the same character structure, I'm using STRSUB to separate the blocks of text. I came across a few issues though:


I have surfaces of different categories, like "PAR" for walls, "FOR" for ceiling, so on.. and those categories are parts of the surface name. I created an array variable to each of those categories, and stored the names there. (This object is running through all the surfaces in the project)




When I try to print a value of those arrays, it works fine. When I try to create a substring out of it it gives errors.




Seems to me the Variable[X] value can't output a substring. Maybe it isn't a string?




Also, I placed a subroutine to sort alphabetically the surface names. But where do I put subroutines? If I place an "END" statement at the master section, it will skip the 2D page. If I place the subroutine at the 2D page, it will give errors in 3D.





Thanks a bunch for your help! 🙂

Architect / BIM Manager at Ideia1 -
Archicad 26 / Windows 10 64


REQUEST "Name_of_material" returns empty string in parameter script. If you placed it in the master script, there will be an error with the parameter script run. Use GLOB_SCRIPT_TYPE to avoid the parameter script context.


The end of the master script can be avoided by adding a label at the end:


goto "masterEnd"








Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest


Thank you guys who gave me tips here. I managed to do exactly what I was trying to, and I think it's working just fine. Once my knowledge in GDL grows better I'll attempt to rewrite it with cleaner code.




But it served its purpose flawlessly and ended up looking nice imho 😅

Its an object that has 2 functions: giving a whole list of surfaces used following a prefix criterion, or showing certain surfaces chosen at the object parameters


Still would need a bunch of tinkering to be useful to anyone else, just posting to share the outcome. Heheh

Architect / BIM Manager at Ideia1 -
Archicad 26 / Windows 10 64

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!