We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.
SOLVED!

UI_CUSTOM_POPUP_INFIELD{2} for Array Parameters

Jochen Suehlo
Moderator

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.

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . 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
Jochen Suehlo
Moderator

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

in the infield as well?

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . 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
Jochen Suehlo
Moderator

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.

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de