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

UI_RADIOBUTTON ignoring second array index

Denny Wong

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.


UI_RADIOBUTTON stores values into [2][2], not [2][3] as specifiedUI_RADIOBUTTON stores values into [2][2], not [2][3] as specified


Tested in AC23 and AC25, latest patches.


You should use  UI_RADIOBUTTON{2} to be able to use matrix parameters with it.



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.

remove quotes


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.

name: parameter name as string expression for UI_RADIOBUTTON{2} or parameter name with optional actual index values if array for UI_RADIOBUTTON.
value: parameter is set to this value if this radio button is set.
text: this text is displayed beside the radio button.
x, y: the position of the radio control.
width, height: width and height in pixels.

the above comes from:

I know it is not clear... but the same aplies to ui_infield's and so on.

Denny Wong

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:

  • parameter name as string expression for UI_RADIOBUTTON{2}
  • or
  • parameter name with optional actual index values if array for UI_RADIOBUTTON

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:

Screenshot 2021-09-28 at 13.27.37.pngScreenshot 2021-09-28 at 13.27.20.png

Sorry I did not do a 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




Denny Wong

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?


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



@Piotr Dobrowolski wrote:

UI_RADIOBUTTON integerArray[2][1], 515, `test Value21`, 10, 160, 100, 20


I think you meant the above. 😄


This basically proves my point: it will assign any value of [i][j] into [i][i].

So here integerArray[1][1] and integerArray[1][2] both went to integerArray[1][1].

Screenshot 2021-09-28 at 14.38.42.png

Screenshot 2021-09-28 at 14.38.12.png



Screenshot 2021-09-28 at 14.42.36.png

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!