I am having trouble with
system.tag.addTag(). Context is adding instances of a UDT. Execution of the
system.tag.addTag() results in a java exception:
system.tag.addTag([Default]site/area1/lineX): Exception type: , value: java.lang.IllegalArgumentException: UDT [Default]types/myUDTs/line does not exist. Can not create instance.
No combination of tinkering with tag provider specifications seems to work.
Back story: We have two UDT’s defined:
The first is supposed to serve as an index of “lines” that constitute an “area”. For sake of illustration I have distilled the
index UDT down to a single memory tag: (of type String instead of say a dataset).
An instance of the
index UDT looks like this:
When the value of the string is changed, the
valueChanged event script should create an instance of the
line UDT in the same folder where the index is located, eg.
area1 in the example shown above.
line UDT here is also distilled down for illustrative purposes:
To facilitate your gaming pleasure, I packaged the
myUDTs folder and the instance folder in two separate XML payloads:
tags-myUDTs.xml (3.3 KB)
tags-site.xml (479 Bytes)
I have tried packaging the
system.tag.addTag() call up inside both project and shared python libraries. As this simplified toy example serves to demonstrate, none of that complexity is causing the Java exception.
I wonder if anyone can enlighten me on this issue. I found a few related posts in the forum but no answers. As I mentioned above, I have experimented with all possible ways of specifying the tag provider. It seems
system.tag.addTag() cannot find the UDT definitions when the program code is bundled up inside a UDT definition.
Do I need to wield the SDK to make this work?