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 23

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
Enthusiast

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.