Script to disable udt instance

Hi,
I wrote a script to disable nested UDT instances that do not exist in the PLC. Supposedly, the member tags should be disabled as well and it shows the disables icons as shown in the picture. However when I check the ‘enabled’ property in one of the member tags, it show true. The value also shows up although it should should show ‘Bad_Disabled’. In this case, should I trust the icon or the enabled property of the member tag? Is the tag polling for data? Please see the pic attached.

When you disable a udt, you’re not disabling it’s children explicitly in their own configuration. If this happened, then you wouldn’t be able to set tags to disabled in the UDT without the fear of that being overridden if someone disabled the whole udt and reenabled it. The tags’ actual disabled state is based on their own configuration and their parents’ state. E.g. If their parent is disabled, then they will be as well. You can trust the icon and their quality.

Thank you. that is good to know

I also figured that restarting the gateway changed the value of the member tags to Bad_Disabled so that confirms the udt children are actually disabled although the ‘enabled’ property of the children are set to True.

You should just be able to restart the UDT instance instead if restarting the whole gateway, although it’s a bug causing the tags to not restart on their own if their parent config changes