License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

GDL
About building parametric objects with GDL.

Using an array to create a dynamic dropdown list?

JGoode
Expert

Hello,

 

is it possible to use an array to create a list of dropdown options that can be changed on the fly?

 

So instead of

values "example" option1, option2... etc

we could have 

values "example" option_array[]

 

which would automatically fill the list with the array values.

 

Thanks

 

 

ArchiCAD 27

Windows 10
2 REPLIES 2
Xandros
Advisor

Hi

it is possible. Here a quick preview:

Xandros_0-1725545054898.png

 

Xandros_1-1725545071610.png

 

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti
vlahtinen
Advocate

What's the type of the parameter? If it's numerical, you could use parameter buffer (put and get). If it's a string, you'll have to use values{2} and create a parameter for the numerical representation of the value, which is a good idea anyways.

 

Edit: never mind, see @Xandros' solution below.