Create a client tag?

ignition80
#1

@PGriffith, @mgross
Is it possible with Ignition 8.0 to create a Client Tag with the SDK ?
I’ve found in the javadoc clientContext.getTagManager().saveTagConfigsAsync ?
Is it suitable for client tag ???
could you provide a snipped if possible ?

0 Likes

#2

Client tags is the only place that was not fully refactored to use the new tag system. I think you can create client tags with the old API, but you also need to save the current project somehow to retain those tags. Anyway, try this:

        // Note that context is DesignerContext
        ClientSubManager targetManager = null;
        ClientTagProvider clientProv = context.getTagManager().getClientTagProvider("client");
        if (clientProv != null && clientProv instanceof SubManagerAdapter) {
            this.targetManager = ((SubManagerAdapter) clientProv).getTarget();
        }

        // Now use something like targetManager.addTags() to add client tags
0 Likes

#3

Thanks a lot, I will try !

0 Likes