Page 1 of 1

Changing Unit's option in python plugin

Posted: Monday 06 December 2021 10:59
by ajarzyn
Hello all,

I found out there's new interface for Units for python plugin development.
Does anyone knows if it's possible to change Units option, and how?

As new documentation states Options member is read only:

Code: Select all

Options 	Read 	Current Device options dictionary
Thus I do not know if it's possible at all.

But as there is 'Update' method I understand that it's possible to change TypeName of the device thus I feel like we should be able to change options value.

Please note that I do not want to delate Unit and create it from the scratch, rather updating existing unit to keep the history of changes.

I would really appreciate any help here.
BR

Re: Changing Unit's option in python plugin

Posted: Tuesday 07 December 2021 22:03
by Dnpwwo
@ajarzyn,

You can change the Options just not the dictionary itself.

If you add, update or remove the Options dictionary entires then invoke Update() the Options for the Unit will be updated.