Template using UDT param: Can you access UDT tag metadata?

No no, in your example you are still using a UDT type parameter. You are far better off to pass in the actual tag path to the UDT instance as a string, and then do exactly the same thing in your example with that.
E.g.
Parameter: TagPath [String]
TagPath = "Tank Farm/Tanks/Tank 1"
Expression: tag({Tank Template.TagPath} + '/Temperature/PV.EngHigh)

If you can pass in a UDT type into a popup without including the UDT type in the object/template you're calling it from, then this most likely won't have any performance impacts, as it will only contain one UDT type. I'm not sure that you can actually do that though... I don't know if you can actually pass in the UDT type without have it as a parameter of the object or an object in the Window. I remember trying this and kept getting the error:
ValueError: Error setting parameter: bob. Could not convert System/PLCs/Diagnostics/Boiler into UDTProperty.

That's using the script:
window = system.nav.openWindow('Main Window (1)', {'bob' : 'System/PLCs/Diagnostics/Boiler'})

where 'System/PLCs/Diagnostics/Boiler' is the path to a UDT instance. The function is looking for a UDTProperty object type, and I'm passing in a string. I don't remember being able to find a function to effectively look up the tag path and return the object, and I certainly wouldn't try using browseTags for that due to it's own performance impacts.

1 Like