# Set Expression Bindings Through Scripting

**URL:** <https://forum.inductiveautomation.com/t/set-expression-bindings-through-scripting/36435>\
**Category:** Ignition\
**Created:** [July 7, 2020, 2:05pm UTC](https://forum.inductiveautomation.com/t/set-expression-bindings-through-scripting/36435 "2020-07-07T14:05:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SMcIntosh](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@SMcIntosh](https://forum.inductiveautomation.com/u/SMcIntosh)\
**Post date:** [July 7, 2020, 2:05pm UTC](https://forum.inductiveautomation.com/t/set-expression-bindings-through-scripting/36435/1 "2020-07-07T14:05:14Z")

</div>

I’m currently in a position where I need to change expression bindings throughout my Vision-based project. There is a very large number of these bindings, and they’re not identical, so I can’t just do a simple find and replace (and manually changing them, even using the find tool, will still be a massive amount of effort). If I could write a script to go through the project and conditionally update the bindings, it would save me a lot of time - I haven’t seen anything to suggest this is possible, though. Does anyone know a way to do something like this?

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 7, 2020, 2:18pm UTC](https://forum.inductiveautomation.com/t/set-expression-bindings-through-scripting/36435/2 "2020-07-07T14:18:04Z")

</div>

You can achieve this using **system.tag.addTag()**

Manual Page:  
[https://docs.inductiveautomation.com/display/DOC79/system.tag.addTag](https://docs.inductiveautomation.com/display/DOC79/system.tag.addTag)

Snippet from the manual page regarding creating a tag with an expression:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/0/903a41eb481d59a9be32b0acbf88ebbfa29ff8a5.png)

As you can see from the snippet you’ll specify the expression in the attributes parameter.

If you’re using Ignition 8; I suggest looking into **system.tag.configure()**

---

<div class="post-metadata">

**Author:** ![SMcIntosh](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@SMcIntosh](https://forum.inductiveautomation.com/u/SMcIntosh)\
**Post date:** [July 7, 2020, 2:34pm UTC](https://forum.inductiveautomation.com/t/set-expression-bindings-through-scripting/36435/3 "2020-07-07T14:34:32Z")

</div>

Thanks for the reply! Unfortunately I’m actually looking at component bindings (eg background color) rather than tags - I should have been more specific.
