# Reading and Writing Tag's UDT Parameters

**URL:** <https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745>\
**Category:** Ignition\
**Created:** [December 16, 2022, 10:30pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745 "2022-12-16T22:30:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmiCanuck](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hmiCanuck](https://forum.inductiveautomation.com/u/hmiCanuck)\
**Post date:** [December 16, 2022, 10:30pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/1 "2022-12-16T22:30:19Z")

</div>

Done some searching but I can't seem to get it working. Ignition 8.1

I have a bunch of tags based on a UDT and have a specific tag parameter that I'd like to read in and then modify via a script. Can anyone provide an example? I've been playing with readblocking, writeblocking and configure with little success.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 16, 2022, 10:36pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/2 "2022-12-16T22:36:49Z")

</div>

In the tag browser, click on the UDT instance and then drill into the parameters. If you right click on a parameter and copy path this is the path that you can use in the read/writeBlocking.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 16, 2022, 11:55pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/3 "2022-12-16T23:55:50Z")

</div>

> [@hmiCanuck](#):
>
> and have a specific tag parameter

Tag property? It would help to know exactly what you're trying to read/write

---

<div class="post-metadata">

**Author:** ![hmiCanuck](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hmiCanuck](https://forum.inductiveautomation.com/u/hmiCanuck)\
**Post date:** [December 20, 2022, 12:20am UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/4 "2022-12-20T00:20:42Z")

</div>

Got it working with the help of the "copy path" thanks.

Any chance you know how I would change a value buried down a few layers in an actual UDT? I can pull down the whole JSON but can't figure how to manipulate a single value and write it back.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 20, 2022, 2:27am UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/5 "2022-12-20T02:27:39Z")

</div>

Copy Path works for UDT instance and definition tags as well. Just keep in mind that writing to a UDT instance tag will _override_ that property in the instance.

UDT Definition tag paths will be prefixed with `_types_/`

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 20, 2022, 12:23pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/6 "2022-12-20T12:23:13Z")

</div>

Check out `system.tag.configure`, there are some code examples you can use for inspiration.  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.configure](https://docs.inductiveautomation.com/display/DOC81/system.tag.configure)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 20, 2022, 8:48pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/7 "2022-12-20T20:48:42Z")

</div>

Take care with using configure with getConfiguration though. Search the forum for posts by me on the subject

Eg

> [@\[FEATURE\] Add option to system.tag.getConfiguration to match output of tag browser \`copy JSON\`](https://forum.inductiveautomation.com/t/feature-add-option-to-system-tag-getconfiguration-to-match-output-of-tag-browser-copy-json/62807):
>
> When you use system.tag.getConfiguration to get the configuration of UDt instances, it retrieves all non-default configuration of the UDT definition’s tags by deep recursively searching. If you compare this to the Tag Browser’s copy JSON functionality, this only copies the properties of the UDT definition tags that are overridden at face value, as well as of the name and tagType. When using getConfiguration with configure, the output from copy JSON is required otherwise you will essentially be…

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 20, 2022, 9:01pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/8 "2022-12-20T21:01:48Z")

</div>

If you don't use `getConfiguration` you can side step the override issue, at least on tags, alarms is another story.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 20, 2022, 10:35pm UTC](https://forum.inductiveautomation.com/t/reading-and-writing-tags-udt-parameters/67745/9 "2022-12-20T22:35:12Z")

</div>

In this case without getConfiguration, make sure that the "merge" option is specified, otherwise you'll lose all other non-default configuration configured on the tags
