Get UDT parameters in event script

Hi all, is there a way to access from a 'Values ​​​​​​​​​​​​​​​​​​​​​​Events -- valueChanged) the parameters of the UDT it belongs to?

I tried with:
parameters=system.tag.readBlocking(["[.].parameters"])[0].value

and it prints all the information of my udt, but when I try to access
parameters.get("Parameter[DBNumber]").value
it gives me an error on the type..

I can't test this right now, but I'm pretty sure you can get all the parameters by using the argument tag in the valueChanged definition.

Try using tag["parameters"]["DBNumber"] ?

EDIT: Nevermind I already have an example about this in one of my UDTs. It's for a "qualityChanged" event script but it should behave the same.

image

Hi Samuel,
thank you very much, now it works correctly

1 Like