Hello There,
I am looking to create a UDT within ManagedTagProvider. I have created managed tag provider through the module on ignition_sdk_examples. Could not find much documentation on creating UDT. This is what I put together just to test out - I know this is no way near but have gotten here so far. Any comments would be really appreciated.
def create():
from com.inductiveautomation.ignition.gateway import IgnitionGateway
# provider = IgnitionGateway.get().getTagManager().getTagProvider('Example')
import com.inductiveautomation.ignition.common.sqltags.model.types.DataType as DataType;
import com.inductiveautomation.ignition.gateway.model.GatewayContext as GatewayContext;
import com.inductiveautomation.ignition.gateway.tags.managed.ProviderConfiguration as ProviderConfiguration;
import com.inductiveautomation.ignition.gateway.tags.managed.ManagedTagProvider;
import com.inductiveautomation.ignition.common.tags.config.types.TagObjectType as TagObjectType; #, UdtInstance;
import com.inductiveautomation.ignition.common.config.BasicBoundPropertySet as BoundPropertySet;
import com.inductiveautomation.ignition.common.tags.config.properties.WellKnownTagProps as WellKnownTagProps;
import com.inductiveautomation.ignition.common.config.PropertyValue as PropertyValue;
import org.apache.log4j.Logger as logger;
log = logger.getLogger('test')
udtPath = 'Test'
newInstance = BoundPropertySet()
log.info(str(newInstance.getProperties()))
newInstance.set(PropertyValue(WellKnownTagProps.TagType, TagObjectType.UdtType))
log.info(str(newInstance.getProperties()))
configuration = ProviderConfiguration("Example")
provider = IgnitionGateway.get().getTagManager().getOrCreateManagedProvider(configuration)
provider.configureTag(udtPath, newInstance)
This is the error I am seeing in the logs: