Check if a path node is a tag

Given a path of withing a tag provider, how to check using the python script if the node the path defines is a tag and not a folder or an UDT?

Thanks!

Use this:

Analyse the dictionary it returns for the type.

  • typeId - Represents the UDT type of the node. If the node is a UDT definition, then the value will be None. If the node is not a UDT, then this filter choice will not remove the element. As such, this filter functions best when paired with a tagType filter with a value of UdtInstance.
{"typeId":"myUDT", "tagType":"UdtInstance"}

A folder will just give you a list of the tags inside it.

Just use system.tag.readBlocking() with the path plus .tagType. Simple tags will be Atomic.

3 Likes