We know how to reference UDT Properties like parameters in Tag Event Scripts like this:
paramValue = tag['parameters']['myParam']
But is there a way to reference them in Gateway Event Tag Change Scripts? I've seen people recommending to create an Expression Tag in the UDT that references the parameter and then just read that Expression tag in the script. Seems clunky to me. Are there any other ways?
1 Like
Construct the appropriate paths and use system.tag.readBlocking()
. Preferably one call to get everything you need.
Looks like you can append /Parameters in the UDT tagPath
tagPath = "[default]temp/udt1/Parameters.myParam"
param = system.tag.readBlocking(tagPath)[0].getValue()
We can't find any documentation showing this but maybe we're looking in the wrong places. Does anyone see any issue with this approach or is there a better way perhaps?