Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

UI_CUSTOM_POPUP_INFIELD

GDL Enthusiast
Participant

Hi GDL experts,

 

I have been reading about UI_CUSTOM_POPUP_INFIELD. I can get it to work in the Interface, however I am wondering how I can feed the result back to a parameter. For example:

 

Interface Script:

UI_CUSTOM_POPUP_INFIELD "MyParameter", 15, 70, 180, 20,
1, 2, 2, "", ! storeHiddenId, treeDepth, groupingMethod, selectedValDescription
"hiddenID1", "type1", "group1",
"hiddenID2", "type1", "group1",
"hiddenID3", "type1", "group1"

 

Then if I create a parameter called "MyParameter" (Type: Abc), can I then reference the parameter with an IF statement in the Master Script:

 

Master Script:

IF MyParameter=hiddenID1 THEN
Text2 0,0, "Type 1, Group 1"
ENDIF

 

At the moment the above doesn't seem to work. I would welcome any help, thank you so much in advance!

1 ACCEPTED SOLUTION

Solution
Zsuzsanna Bori
Graphisoft
Graphisoft

Hi,

In the master script when referencing string type parameters, you have to use “ “ as well. The other issue here is in the interface script, the array you have defined contains duplicates, all of the entries are the same “type1”, “group1”, you have to have a different combination for all the hiddenIDs in order for your array to work. Your working code should look like this:

UI_CUSTOM_POPUP_INFIELD "MyParameter", 15, 70, 180, 20,

1, 2, 2, "", ! storeHiddenId, treeDepth, groupingMethod, selectedValDescription

"hiddenID1", "type1", "group1",

"hiddenID2", "type1", "group2",

"hiddenID3", "type1", "group3"

 

Master script:

IF MyParameter = "hiddenID1" THEN

Text2 0,0, "Type 1, Group 1"

ENDIF

View solution in original post

2 REPLIES 2

Solution
Zsuzsanna Bori
Graphisoft
Graphisoft

Hi,

In the master script when referencing string type parameters, you have to use “ “ as well. The other issue here is in the interface script, the array you have defined contains duplicates, all of the entries are the same “type1”, “group1”, you have to have a different combination for all the hiddenIDs in order for your array to work. Your working code should look like this:

UI_CUSTOM_POPUP_INFIELD "MyParameter", 15, 70, 180, 20,

1, 2, 2, "", ! storeHiddenId, treeDepth, groupingMethod, selectedValDescription

"hiddenID1", "type1", "group1",

"hiddenID2", "type1", "group2",

"hiddenID3", "type1", "group3"

 

Master script:

IF MyParameter = "hiddenID1" THEN

Text2 0,0, "Type 1, Group 1"

ENDIF

View solution in original post

GDL Enthusiast
Participant

Hi Zsuzsanna,

 

That is so great, thank you for helping me progress this through, really appreciated!!!

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!