cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Jochen Suehlo
Moderator Emeritus

UI_CUSTOM_POPUP_INFIELD{2} for Array Parameters

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-29 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
2 Solutions

Accepted Solutions
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
Graphisoft SE, Budapest

Go to post

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
Graphisoft SE, Budapest

Go to post

4 Replies 4
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
Graphisoft SE, Budapest
Jochen Suehlo
Moderator Emeritus

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-29 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
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
Graphisoft SE, Budapest
Jochen Suehlo
Moderator Emeritus

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-29 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

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!