UDT Nesting vs Inheritance

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.

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

1 Like