8.1.5
I don’t find any exemple to manage, create, delete tag group with scripting.
Is there a way to do that ?
8.1.5
I don’t find any exemple to manage, create, delete tag group with scripting.
Is there a way to do that ?
Hi @luc.martin, I don’t think it is possible, but I’ve never looked into it too deeply so
Just out of interest why would you need to manage tag groups in this way? Could be worth a feature request.
There is a series of commands to do that.
system.tag.*
has commands to create (add in 7.9.x/configure in 8.x), edit, delete, organize, retrieve.
Everything I’ve ever needed is already there.
I use scripting to manage, create and delete my UDTs, so I want to validate if tag group exist and configured correctly when I plublish an update.
Unfortunately there doesn’t seem to be anything for manipulating tag groups there. Those set of functions only seem to encompass tag manipulation (as far as I can see).
That makes sense and it could be quite useful. If you don’t get an answer definitely look into making a feature request.
I was about to say to put it in the ideas portal.
I thought there was already one there, but I don’t see it.
You’re not missing anything, but yes, this should definitely be possible.
On a related note, do any of you know if there currently is a way to retrieve a list of existing tag groups via scripting?
How is going this feature?
I just came to a situation when this would be a very useful feature...
this will get you a list of all the tags of the given provider (this case default)
from com.inductiveautomation.ignition.gateway import IgnitionGateway
provider = IgnitionGateway.get().getTagManager().getTagProvider('default')
taggroups = provider.getTagGroupsAsync().get()
names = [x.getName() for x in taggroups]
there is also saveTagGroupsAsync()
and removeTagGroupsAsync()
https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/ignition/common/tags/model/TagProvider.html#getTagGroupsAsync()
Send a message to a message handler.
Ok, but from where?
Sorry but … I’m
Wherever you needed it in Vision?
Define a gateway message handler in your project that will run @victordcq’s gateway-scoped code. Call that message handler from anywhere in Vision Client scope using system.util.sendMessage
or sendRequest
.
Now I understand.
Thank you.
Is this the only way (or at least the best/easiest way) to get a list of tag groups?