We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-09-27 01:46 PM - last edited on 2024-09-09 11:23 AM by Doreena Deng
Hi All,
I am trying to use UI_RADIOBUTTON with a 2 dimensional array parameter. However if I ask for _param[i][j], it will always store the value in [i][i] instead, making this command useful in the diagonal matrix only.
I hope I am not missing something obvious - but this appears to be a bug to me...?
Many thanks in advance, I'll love to hear your thoughts.
Tested in AC23 and AC25, latest patches.
Solved! Go to Solution.
2022-01-14 08:46 AM
Yes, this is a bug, thank you for reporting. It will be fixed in the next version (AC26).
2021-09-27 08:25 PM
You should use UI_RADIOBUTTON{2} to be able to use matrix parameters with it.
Piotr
2021-09-28 09:28 AM
Hi Piotr, many thanks for your reply. I thought UI_RADIOBUTTON{2} only take string expression for the parameter and its not taking "someintegers[2][3]" nor someintegers[2][3]. Am I missing something?
Thanks in advance.
2021-09-28 02:19 PM
remove quotes
2021-09-28 02:23 PM
UI_RADIOBUTTON{2}
Compatibility: introduced in Archicad 20.
UI_RADIOBUTTON{2} "name", value, text, x, y, width, height
Generates a radio button of a radio button group. Radio button groups are defined by the parameter name.
Items in the same group are mutually exclusive.
the above comes from:
https://gdl.graphisoft.com/reference-guide/the-user-interface-script
2021-09-28 02:25 PM
I know it is not clear... but the same aplies to ui_infield's and so on.
2021-09-28 02:32 PM - edited 2021-09-28 02:34 PM
Thanks Piotr, I am aware of the difference between UI_INFIELD and UI_INFIELD{2} / UI_INFIELD{3} and UI_INFIELD{4}. And from that I am fairly certain that UI_RADIOBUTTON is in fact the right one to use - as it states clearly:
Basically UI_RADIOBUTTON works like UI_INFIELD{2} and UI_RADIOBUTTON{2} works like UI_INFIELD. Very inconsistent but well that's GDL.
Just to be very clear what would happen:
2021-09-28 02:43 PM
Sorry I did not do a test...it works with original one...
Parameter is integer
UI_RADIOBUTTON{2} integerArray[1][1], 513, `test Value1`, 10, 140, 100, 20
UI_RADIOBUTTON{2} integerArray[2][2], 1513, `test Value2`, 10, 160, 100, 20
2021-09-28 02:45 PM
No worries, thanks Piotr. Now if you just quickly try again with integerArray[1][2] and integerArray[2][1], see if you get the correct results?
2021-09-28 03:27 PM
there is some..."consistency" 😛
UI_RADIOBUTTON integerArray[1][1], 513, `test Value11`, 10, 140, 100, 20
UI_RADIOBUTTON integerArray[1][1], 515, `test Value21`, 10, 160, 100, 20
UI_RADIOBUTTON integerArray[1][2], 1515, `test Value12`, 10, 180, 100, 20
UI_RADIOBUTTON integerArray[2][2], 1513, `test Value22`, 10, 200, 100, 20
It seems that it can set column wise.. test this and You will see...
I do not know if it is a bug or feature