I have recently upgraded our template objects to use UDT bindings and I noticed something strange. When I instantiate a new template on a screen and check the UDT tag bindings using the magnifying glass I see the following (as expected):
However, if I bind a UDT and then remove that binding from an object, I would expect to see the above chart which is a null binding. Instead here is an example of the UDT tag bindings I see after I have already removed the binding:
So it appears to me that the binding isn’t actually removed behind the scenes. I noticed this behavior because some of my Python scripts were referencing bindings that were previously removed. Is there any way to truly remove a binding besides dragging in a brand new template instance?
Thanks in advance!
It appears I have an understanding of this behavior now. Once the template is reloaded in Designer (close->save->reopen) or in the client (update after Designer save), the UDT instance is truly no longer bound. For my workflow this just requires me to just close and reopen the template in the Designer occasionally while working. This is really not a big deal, but I might still look for a scripting solution. It wasn’t obvious to me at first that the bindings aren’t completely cleared after clicking “No Binding”.
Also, I just tried this with a check box component and boolean memory tag (bound to “Selected”) and it appears to work the same (i.e. the binding isn’t completely removed until the template is reloaded). I wasn’t sure if this was directly related to using UDT parameters or an artifact of binding. It appears to be the latter.