Is it possible to change binding with scripting?


In my project I have bound several components color properties to memory tags with hex color code.

The idea was that I could then quickly change the color of several components by changing the hex code in one memory tag.

This works fine, but I’ve in a situation now where I have to change the binding of alot of the components.

Can this be done through scripting? Or do I have to go through them all by hand?


I’m not aware of a way to change the bindings through a script. Are you talking about e.g. batch changing bindings from one tag to another? That you can do through the find/replace utility in the designer.

You can try the following code to get your binding working from a script, running in Designer (7.9.10, at least):

context = IgnitionDesigner.getFrame().getContext()
vision = context.getModule(VisionDesignerInterface.VISION_MODULE_ID)
binding = ExpressionBindingConfig("Your expression source string", overlayOptOutFlag)
vision.configureBinding(component, propertyName, binding)

I believe, there should be a way to do it in a Client too, once you figure out how to get its context.

1 Like