Hello
I'm having issues adding parameters to my UDTs through scripting and I'm not quite sure why. The parameter {opcServer} shows up after running the code, but it doesn't show it in italics. It shows up literally as {opcServer} instead of as a parameter. I've attached the code example below.
Thank you!
def createUDTs2():
udtName = "GarbageUDT"
parameters = {
"nameSpace": "",
"siteCode": "",
"siteID": "",
"number": "",
"version": "",
"opcServer": ""
}
provider = "default"
system.tag.addTag(parentPath="", name=udtName, tagType="UDT_DEF", parameters=parameters)
opcItemPath = "path"
namespace = "nsu=something;s="
siteID = "siteID"
number = "0001"
tagName = "Milk"
folderName = "folder"
opcServer = "OPC"
attributes = {
"OPCItemPath": opcItemPath,
"OPCServer": "{opcServer}"
}
system.tag.addTag(
parentPath="[default]_types_/GarbageUDT",
name=tagName,
tagType="OPC",
dataType="Float4",
attributes=attributes
)```