# Edit UDT Type (not instance) through script

**URL:** <https://forum.inductiveautomation.com/t/edit-udt-type-not-instance-through-script/16572>\
**Category:** Ignition\
**Created:** [January 12, 2018, 10:05am UTC](https://forum.inductiveautomation.com/t/edit-udt-type-not-instance-through-script/16572 "2018-01-12T10:05:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esn](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@Esn](https://forum.inductiveautomation.com/u/Esn)\
**Post date:** [January 12, 2018, 10:05am UTC](https://forum.inductiveautomation.com/t/edit-udt-type-not-instance-through-script/16572/1 "2018-01-12T10:05:44Z")

</div>

Hi,

I need to add a lot of tags to different UDT Types.  
I can easily create the tags using the system.tag.addTag() function in the script console, but it seems like I cannot add tags to an UDT Type using script.  
Am I doing it wrong or can’t it be done?

Thanks

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [January 12, 2018, 11:01am UTC](https://forum.inductiveautomation.com/t/edit-udt-type-not-instance-through-script/16572/2 "2018-01-12T11:01:30Z")

</div>

Are they all the same tags? If so, you could perhaps structure it with parent-child UDTs. All tags you define on a parent UDT will be inherited by the child UDT.

One major annoyance is that you can’t change the parent of an UDT once the child is created …

So perhaps you can create an empty parent first, export your tags to XML, modify the XML by hand (with a decent text editor like Notepad++ on Windows), and import the XML again.

It’s probably enough to add the line `<Property name="UDTParentType">path/to/UDTParent</Property>` per UDT to your XML, but best try with a small example first to see if everything imports nicely.
