Get OPCItemPath and OPCServer values of UTD Opc Tag Property

Hi Guys,
I have some UDT defined with properties that are binded to an OPC server. I’m working well with the tags created from those UDT.
I could retrieve in script the Attribute full path (TagFolder/UDT_InstanceTag/Tag_Attribute). But now I need to get OPCServer and OPCItemPath attributes values of the properties within my script.
May somebody give me an approach about how to get it working?

Thank you!


The OPCServer and OPCItemPath are dot properties of the OPC tag. So to read their values, you would do something like the following, assuming your OPC tag was named MyOPCTag.

qv =“MyOPCTag.OPCServer”)
opcServer = qv.value
print "The OPC server is " + str(opcServer)

qv =“MyOPCTag.OPCItemPath”)
opcItemPath = qv.value
print "The OPC item path is " + str(opcItemPath)