We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-10-25 04:45 PM - last edited on 2024-09-09 11:21 AM by Doreena Deng
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!
Solved! Go to Solution.
2021-11-03 09:50 AM
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
2021-11-03 09:50 AM
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
2021-11-03 03:04 PM
Hi Zsuzsanna,
That is so great, thank you for helping me progress this through, really appreciated!!!