Browse UDT Definitions and configure from Java SDK

Hello,
how can I browse UDT definitions and configure it from Java SDK?

Thank you

From a GatewayContext, call getTagManager(), which returns a GatewayTagManager - which has a general browse method. If you know which specific provider you want to edit tags in, you can getTagProvider(name), and then use the methods on the TagProvider to apply edits.

Yes, I know. But I don’t know how to browse UDT types only. Not instances.
I can browse it in jython with system.tag.getConfiguration. How can I do it in Java SDK ?

Thank you

From a TagProvider you call browseAsync with a BrowseFilter.
CompletableFuture<Results<NodeDescription>> browseAsync(TagPath tagPath, BrowseFilter filter)

You can create a new BrowseFilter(), then add a restriction for UDT definitions by adding a property filter with a key of com.inductiveautomation.ignition.common.tags.config.properties.WellKnownTagProps.TagType and a value of com.inductiveautomation.ignition.common.tags.config.types.TagObjectType.UdtType

1 Like

If the function system.tag.browse in Jython is equal to browseAsync in Java then it is not possible to get UdtType node from it.
When I print all nodes without filter from system.tag.browse there are no UdtType nodes.
I tried browsAsync with UdtType filter but I get nothing.
I can get UdtType nodes with TagConfgsAsync.

Seems to work for me:

Thank you. TagConstants.UDT_ROOT_PATH is the right parameter what I didn’t know.
But NodeDescription type is only for reading isn’t it ?
When I need to change configuration of UdtType node I have to use TagConfiguration type from getTagConfigAsync method…???

I’m not an expert on the tag system, but yes, that’s my understanding. There’s a single ‘Tag’ object on the backend, and read vs getConfig just find it and return different views of its data.

This function doesn’t return UDT definitions, it lists the UDT instances. How can I generate the UDT definition as a json object or a python dictionary for that matter?