system.tag.addTag with a user defined data type?

Can system.tag.addTag create tags with a user defined data type? I’m trying and it doesn’t appear to be supported but I wanted to check before I gave up.

The function can create UDT instances, but cannot create UDT definitions. For the former, you can check the following Manual page for more information: … tag.addTag

UDT instance is what I was trying to create. Strange, didn’t work when I tried it and the help file at the time listed datatypes that you could work with and UDT or instance wasn’t listed but I see it now. Will try again. I’ve since changed my plan and no longer need this but will try it in case it comes back up.


The example in the manual shows how to do this:

#Example: Add UDT instance tag
# Before running this script, there must be a UDT named 'Motor'
# that has a string parameter 'DeviceName' and an integer parameter
# 'MotorNumber'.
system.tag.addTag(parentPath='', name="TagUDT", tagType="UDT_INST", attributes={"UDTParentType":"Motor"}, parameters={"DeviceName":"CLX", "MotorNumber":1})