# Good method for UDT management

**URL:** <https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [January 31, 2024, 2:52pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015 "2024-01-31T14:52:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 2:52pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/1 "2024-01-31T14:52:37Z")

</div>

i admit, i'm still a little hazy on what's being asked of me, but here we go! i'm looking for some methods for managing UDTs. each project has a different set of UDT definitions, but only _just_ different. ideally, i'd like something like the Master/Slave relationship that projects have. depending on the pump/engine/thing, it has only one or two additional (or fewer) tags that need adding. ideally, we'd like slave projects to inherit the UDT definitions from the Master project. then we can just make sure that UDT list has every option, used or not. and if a new one pops up with a newer gen pump/engine/thing, we can just add it to the master UDT definitions and it'll propagate. can that be done?

why are we looking for this? 2 reasons: 1) someone forgot to add a tag and now it's being referenced in a ton of slave projects that will need that _one_ thing added. 2) newer generation equipment is coming online with additional scada properties that will need to be implemented per unit, per project. it would be nice to just have a central UDT repo for these cases.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 31, 2024, 2:55pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/2 "2024-01-31T14:55:18Z")

</div>

Tags and UDT definitions are global resources tied to tag providers, not project resources. There's no inheritance across projects nor across tag providers. They **can** be distributed/updated via EAM, though.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/3 "2024-01-31T14:58:19Z")

</div>

ok. feed my knowledge gap: can a UDT definition be tied to multiple tag providers? what is EAM?

###### what i wouldn't give for actual time to properly ramp...

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 3:04pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/4 "2024-01-31T15:04:10Z")

</div>

I'll let Phil or others answer your first question.

As for the second;

[https://docs.inductiveautomation.com/display/DOC81/Enterprise+Administration+Module](https://docs.inductiveautomation.com/display/DOC81/Enterprise+Administration+Module)

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 3:04pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/5 "2024-01-31T15:04:14Z")

</div>

nm. found EAM. reading now.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 3:25pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/6 "2024-01-31T15:25:07Z")

</div>

yeah. i don't think this is the solution. we only have one Ignition server (don't even get me started...) so, if my read is correct, the EAM doesn't really help. so something is missing conceptually with regards to the UDT definitions and how they _are_ implemented vs how they _should_ be implemented.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 31, 2024, 4:02pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/7 "2024-01-31T16:02:32Z")

</div>

> [@ian.sebryk](#):
>
> can a UDT definition be tied to multiple tag providers?

No. Each provider needs its own UDT definitions.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 5:03pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/8 "2024-01-31T17:03:57Z")

</div>

okay... then... hm.

🧠 ⚙ ⏳

if i understand correctly, these UDT definitions are just text files residing on the server...if so, it should be feasible to run some awk or python to check a 'master' and write changes to 'slaves' on file change... right? the only issue is that it won't update to currently-opened Designer projects (as i understand), but that's a small price to pay _if_ that works.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 5:07pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/9 "2024-01-31T17:07:35Z")

</div>

This is my understanding based on forum reading - willing to be sat corrected if I am wrong.

All tag definitions (including UDTs') are stored in an IDB using SqlLite. It is possible, to run SQL against this, however, it is not recommended.

8.3 (Due for public beta release Q4 2024 and production release possibly Q1 2025) is making changes to certain aspects of the Ignition framework, however, I am not sure if tags/UDTs'/IDB are part of that. @paul-griffith ?

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 5:10pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/10 "2024-01-31T17:10:30Z")

</div>

ah! then that _might_ even be easier since db ops are cake...

> [@Matrix\_Engineering](#):
>
> it is not recommended

why is that ↑ ?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 5:11pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/11 "2024-01-31T17:11:39Z")

</div>

Ignition is writing to it live, so you can create locks if you 3rd party access it.

Let me find a thread on such.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 5:13pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/12 "2024-01-31T17:13:25Z")

</div>

Well here's how, not why not to:

> [@Export/Extract tag path for OPC tags based on scanclass](https://forum.inductiveautomation.com/t/export-extract-tag-path-for-opc-tags-based-on-scanclass/40034):
>
> Hi All I’m trying to export the tagpaths for multiple tags based on a particular scan class on my Ignition project. I tried to load the configuration file (config.idb) in MySQL lite and get it from there but no luck. I also tried to use scripting: system.tag.browseTags() to get the list of tags and sort according to the scan class but no luck there either. This is the code snippet that I ran as a project script: def tagpath(): tags = system.tag.browseTags(parentPath="", recursive=True) for …

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 5:14pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/13 "2024-01-31T17:14:24Z")

</div>

Here's Paul saying not to, but not why not to:

> [@Script to change the gateway device connection timeout](https://forum.inductiveautomation.com/t/script-to-change-the-gateway-device-connection-timeout/72929/2):
>
> If you can afford some downtime, you can change values in the IDB directly (it's just a SQLite database). Those values aren't safe to modify directly while the gateway is running, though.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [January 31, 2024, 5:14pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/14 "2024-01-31T17:14:34Z")

</div>

SQLlite is one access at a time only unlike other DB's where multiple simultaneous access is allowed.

If you really really want to do this outside of EAM and manual operation, you _might_ be able to script this using [system.tag functions](https://docs.inductiveautomation.com/display/DOC81/system.tag). I honestly don't know if they support UDTs or not. I've never tried it.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 5:15pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/15 "2024-01-31T17:15:19Z")

</div>

> [@Matrix\_Engineering](#):
>
> you can create locks if you 3rd party access it.

well... 💩. that 📯.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 5:17pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/16 "2024-01-31T17:17:22Z")

</div>

> [@bschroeder](#):
>
> outside of EAM

i flat out don't see how it _can_ be done in EAM. unless i missed something, EAM is meant to manage multiple instances of Ignition, not multiple projects on one instance.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 5:19pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/17 "2024-01-31T17:19:32Z")

</div>

Yeah, that's what I'm thinking... why does this need to be external?

I don't understand what Ian is trying to fully achieve here, but, for example, the manual has this code:

```auto
# UDT Definitions reside in the "_types_" folder, which can be retrieved
# via the Tag Browser : right-click > Copy Tag Path.
# Retrieving the existing configuration is much easier than typing it all out.
tag = system.tag.getConfiguration("[default]_types_/myUdtDef")
 
# This line is accessing the first tag in our results (the UDT Definition), then returns the
# 'parameters' dictionary, which then provides access to individual parameters.
tag[0]['parameters']['myParam'] = '300'
 
# Overwrite the existing configuration.
collisionPolicy = "o"
  
# Write the new configuration to our existing UDT Definition.
# Note that the first parameter is to the parent folder of the Definition,
# not a path to the Definition.
system.tag.configure("[default]_types_", tag, collisionPolicy)
 
# Once the configure call finishes, myParam on the Definition should have a value of 300.

```

[https://docs.inductiveautomation.com/display/DOC81/system.tag.configure](https://docs.inductiveautomation.com/display/DOC81/system.tag.configure)

There is also system tag export and import, so if Ian really wants to do this externally for whatever reason; script the export, process it as they see fit (can you export a definition though, or only an instance), then reimport.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [January 31, 2024, 5:25pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/18 "2024-01-31T17:25:46Z")

</div>

UDT's aren't project specific, but tag provider specific.

I can honestly say I've not tried to do this across tag providers on the same Gateway... so it's possible that EAM won't work either, and if EAM won't work then you are up to either manually keeping this in sync or scripting.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 31, 2024, 5:34pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/19 "2024-01-31T17:34:00Z")

</div>

> [@Matrix\_Engineering](#):
>
> I don't understand what Ian is trying to fully achieve here

neither do i... just kidding.

let's see if this helps. i have two pump brands and two clients. which means two projects. each brand of pump spit out a bunch of data to the PLC, which gets built into a UDT definition in each project. (promise, i'm not trying to patronize). client project 1 uses brand 1 pumps, client 2, pump 2. now client 1 decides to use pump brand 2 in their project. we have to update the UDT definitions to encompass the extra data that pump brand 2 sends. i don't care that pump brand 1 does not send those values, we don't look for them anyway. this is now a somewhat unified UDT definition that handles both pump brands in one UDT.

enter pump brand 3.

now multiply all this by 10.

what is happening is updates to one UDT definition is not getting mirrored in other projects. so when the new devices come online, the _project_ gets new bindings from the Master project, but the UDT definitions get overlooked. which means the project, not having an updated UDT definition, promptly 💩 🛏.

life is now hard.

i want a central repo, similar to project Master/Slave, where if i update a UDT definition, it propagates to all slaves.

does that help clarify? if not, let me know. 👍

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 31, 2024, 5:37pm UTC](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015/20 "2024-01-31T17:37:58Z")

</div>

Yes, however, probably help _other people_ help you rather than I... I did Inductive University back in like 2015 and I've forgotten some of it now 🙂

What I would suggest you look at is **parameterisation (zation, I'm in UK =p)**

The Master/Slave you suggest is definition being propgated to instances (IA terms).

We're coming from opposite ends of the spectrum, from reading your other posts, you are a web programmer getting into controls/Ignition whereas I started with controls/wiring/PLCs so I'm not the best to suggest OOP methods here.

[Next page](https://forum.inductiveautomation.com/t/good-method-for-udt-management/85015.md?page=2)
