# UDT Nesting vs Inheritance

**URL:** <https://forum.inductiveautomation.com/t/udt-nesting-vs-inheritance/83323>\
**Category:** Ignition\
**Created:** [December 19, 2023, 5:46pm UTC](https://forum.inductiveautomation.com/t/udt-nesting-vs-inheritance/83323 "2023-12-19T17:46:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpavlicek](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rpavlicek/32/55868_2.png) [@rpavlicek](https://forum.inductiveautomation.com/u/rpavlicek)\
**Post date:** [December 19, 2023, 5:46pm UTC](https://forum.inductiveautomation.com/t/udt-nesting-vs-inheritance/83323/1 "2023-12-19T17:46:00Z")

</div>

Is there any recommendations when to use UDT Nesting vs Inheritance and what anyone else uses more often or when to avoid one over the other?

I know the general difference and how they work. However, it seems they can almost be made interchangeable, differing by how it makes the tag structure.

I'm setting up a project where the industry is known to have many possible variants and one or few offs, but does have a good amount of structure. As I get further along, I was trying to make use of more UDT inheritances, but now wondering if just making more base UDTs and nesting inside a larger UDT would work better in the long run.

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [December 19, 2023, 9:00pm UTC](https://forum.inductiveautomation.com/t/udt-nesting-vs-inheritance/83323/2 "2023-12-19T21:00:35Z")

</div>

To me, both are really different.

I use inheritance like as a BasicEquipment, with common values, and inherit those with additional informations, that are specific to some equipment type. I also have a BasicWidget that define a widget position and view, and inherited UDT that define tags that are specific for the view used by the widget. In my case, I use script to find UDT instance, and instance of inherited UDT, so I can get a full list of all equipments or widgets in a specific folder

For nesting, I have part UDT, nested in an order UDT  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/5519b3e6a617fc203e6a6590cc32f4f093d634fb.png)
