BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.
SOLVED!

UI_CUSTOM_POPUP_INFIELD{2} for Array Parameters

Joachim Suehlo
Advisor

How do I use UI_CUSTOM_POPUP_INFIELD{2} for Array Parameters?

With a non Array Parameter the following example works well.

 

 

UI_CUSTOM_POPUP_INFIELD "best_1", 81, dy, 40, 24,
0, 0, 1, "", 
"A",
"B",
"C"

 

 

But the same syntax does not work with an array parameter:

 

 

UI_CUSTOM_POPUP_INFIELD{2} best[i], 126, dy, 40, 24,
0, 0, 1, "", 
"A",
"B",
"C"

 

 

I cannot use VALUES in the Parameter Script, because every Array Parameter Index must have a different Value-List.

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution
Peter Baksa
Graphisoft
Graphisoft

The manual is confusing about this command, this is what you need:

UI_CUSTOM_POPUP_INFIELD{2} arrayPar[i], 0, 0, 200, 30,
	1, 1, 1, "", ! storeHiddenId, treeDepth, groupingMethod, selectedValDescription
	"id1", "value1",
	"id2", "value2"

"id..." is the hidden id, which has to be unique among all options.

id and value has to be the same type as the parameter.

The parameter will contain the selected hidden ID.

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

View solution in original post

Solution
Peter Baksa
Graphisoft
Graphisoft

What do you mean by same values?

The id is not shown, the value is shown. You can make the values equal the ids.

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

View solution in original post

4 REPLIES 4
Solution
Peter Baksa
Graphisoft
Graphisoft

The manual is confusing about this command, this is what you need:

UI_CUSTOM_POPUP_INFIELD{2} arrayPar[i], 0, 0, 200, 30,
	1, 1, 1, "", ! storeHiddenId, treeDepth, groupingMethod, selectedValDescription
	"id1", "value1",
	"id2", "value2"

"id..." is the hidden id, which has to be unique among all options.

id and value has to be the same type as the parameter.

The parameter will contain the selected hidden ID.

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

Thank You Peter, that works well.
Is it also possible to have the same values shown in the popup

in the infield as well?

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
Solution
Peter Baksa
Graphisoft
Graphisoft

What do you mean by same values?

The id is not shown, the value is shown. You can make the values equal the ids.

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

The first time I tried it, it did not work, that the IDs and the values are equal.
Now it works, thank you for following up.

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
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!