The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy, rmasaki

By Tomer1
#301278
Hey,

I have 3 radio buttons in the same group. In the palette they look good - I can switch between them and the previous checked RadioButton will become unchecked..
But in the code I can’t get or change the status of them. DGselectradio doesn’t work.. also when trying to get the current checked radiobutton I always get 0 (with DGgetcheckedtadio or DGgetitemvallong).
Maybe there was a define or another function I should have called?

Thanks!
By Tomer1
#301297
Ralph Wessel wrote:
Tue Sep 03, 2019 3:31 pm
Are you passing the ID of the radio group to DGGetCheckedRadio (as opposed to a control index)?
Yep. I set the ID of the group to 1 (and it’s working, the check is switched when checking between different radio buttons). And I’m passing 1 and it doesn’t work :(
User avatar
By Ralph Wessel
#302010
I can only say that it's working normally for us. If you post some source code, it might be possible to spot a reason for it not working in this case.
#302325
Tomer1 wrote:
Tue Sep 03, 2019 12:03 pm
Hey,

I have 3 radio buttons in the same group. In the palette they look good - I can switch between them and the previous checked RadioButton will become unchecked..
But in the code I can’t get or change the status of them. DGselectradio doesn’t work.. also when trying to get the current checked radiobutton I always get 0 (with DGgetcheckedtadio or DGgetitemvallong).
Maybe there was a define or another function I should have called?

Thanks!
Could you please post some of your code here? Also, have you tried to use the C++ interface of DG?

Best, Akos
#302479
I think it was a syntax mistake. Tried from scratch again and got it working. I think that maybe not using capital letter for my const short checkbox somehow made it stop working..
Also, when using DGGetItemValLong it worked when I uses dialogID but not when used DG_TOP_MODAL

Thanks everyone! :)