How to change UI widget parameters by code?

Hello!
First of all please forgive me for my maybe stupid question.

I have a buttonRadio Widget named “buttonRadio”, inside a Container named “ui”, and I should modify its value (0,1,2, etc) manually just clicking on each button, and by code too.

So I’ve wrote this simple line of code in Textporter, just to check if it was working:

op('ui/buttonRadio').par.Value0 = 1

But I get this error:

AttributeError: 'NoneType' object has no attribute 'par'

What I’m doing wrong?
How can I access to the “Value0” parameter of the widget?
Many thanks!

Hi @Issimissimo,

this would indicate that the supplied path is wrong. Could it be that the container “ui” is inside “/project1”?

What I often do is drag the container into the Textport which will paste the path of the operator directly and helps me avoid typos.

cheers
Markus