Bulk Remove Component Bindings

I am upgrading an Ignition 7.9.4 gateway to Ignition 8.1.5. A well known issue after upgrading is that all the components that have a .tooltip binding on their Mouseover Text OR toolTipText property will display a bad quality overlay until that binding is removed. The way I’m removing the bindings now is doing a search all on the phrase “.tooltip” and going over every single binding and removing it using the “No Binding” button. Is there any other/faster way I can do this process? Could it be achieved via scripting? Any ideas are greatly appreciated.

Unfortunately, this isn’t really something you can script; we don’t really have any support for meta-programming inside the designer itself.

I found out that if I search for the following phrase “*.tooltip”, it will return all the full path tooltip bindings. I tried replacing the returned binding with just a blank text but will not remove the binding on the property. Meaning that the toolTipText property in the property editor will still show that it is bound to a tag, but the path will just be blank. Do you think that will cause any issues?

It’s…probably fine. There’s some runtime cost for having the bindings, but I bet they’re no-op evaluating pretty quickly with no actual tagpath configured. I’d call this ‘undefined behavior’, though - I won’t guarantee this won’t start throwing an error or something else annoying upon an Ignition upgrade in the future.

1 Like

Found a way to do it via scripting. The script will need to run on every window that has toolTipText bindings you want to remove. This could also be applied on any other property bindings you wish to remove.
Here’s the script:

#This script will remove all toolTipText bindings on the window it runs on
window = system.gui.getParentWindow(event) #get window PyObject
Container = window.getRootContainer() #get root container
Component_Array = Container.getComponents() #get components in root container

def recursiveBindingRemove(component):

	window.interactionController.removePropertyAdapter(component, 'toolTipText') #removes tool tip text binding from defined component(could be replaced with any component property)
	componentArray = component.getComponents() #gets components in the defined component
	if len(componentArray) > 0:
		for c in componentArray: #loop through the components inside the defined component and remove the binding on each
			result = recursiveBindingRemove(c) #run the function again

for component in Component_Array:
	name = component.name #returns the name of every component under the root container
	result = recursiveBindingRemove(component)