Using Ignition 7.7.4
I am in the process of trying to use the system.tag.addTag to create an UDT instance. I have created a different tag provider the the usual default. When I run the script I get an error on the following line:
system.tag.addTag(parentPath=“Sensors”, name= "Sensor " + name, tagType=“UDT_INST”, attributes={“UDTParentType”:“Sensor”}, parameters={“SensorNum”:name})
The error reads:
Traceback (most recent call last):
File “event:actionPerformed”, line 23, in
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: UDT [default]types/Sensor does not exist. Can not create instance.
caused by GatewayException: UDT [default]_types_/Sensor does not exist. Can not create instance.
caused by IllegalArgumentException: UDT [default]_types_/Sensor does not exist. Can not create instance.
Ignition v7.7.4 (b2015033012)
Java: Oracle Corporation 1.8.0_40
Sensor is an UDT and Sensors is the folder that I am trying to create the instance in
I have tried creating just a generic tag but, when created the tag shows up in the “default” tag provider NOT the provider I have chosen for this project so, I assume that means that I am somehow not targeting the chosen provider properly.
How do you change this?