# Get OPCItemPath and OPCServer values of UTD Opc Tag Property

**URL:** <https://forum.inductiveautomation.com/t/get-opcitempath-and-opcserver-values-of-utd-opc-tag-property/8305>\
**Category:** Ignition\
**Created:** [April 14, 2014, 4:28pm UTC](https://forum.inductiveautomation.com/t/get-opcitempath-and-opcserver-values-of-utd-opc-tag-property/8305 "2014-04-14T16:28:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdafonseca](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@cdafonseca](https://forum.inductiveautomation.com/u/cdafonseca)\
**Post date:** [April 14, 2014, 4:28pm UTC](https://forum.inductiveautomation.com/t/get-opcitempath-and-opcserver-values-of-utd-opc-tag-property/8305/1 "2014-04-14T16:28:03Z")

</div>

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!

Claudio

---

<div class="post-metadata">

**Author:** ![RRRancher](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RRRancher](https://forum.inductiveautomation.com/u/RRRancher)\
**Post date:** [April 15, 2014, 8:59pm UTC](https://forum.inductiveautomation.com/t/get-opcitempath-and-opcserver-values-of-utd-opc-tag-property/8305/2 "2014-04-15T20:59:38Z")

</div>

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 = system.tag.read(“MyOPCTag.OPCServer”)  
opcServer = qv.value  
print "The OPC server is " + str(opcServer)

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