Description

Learn how to change the template path of an instance on a window dynamically.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] When you drag a template onto a window, you're dragging a template holder or a template instance on the window. As you can see here, this template instance has a property called "Template Path". A template path allows us to point to the right template that you have configured in your Designer. It is possible to make this path dynamic in that you can bind it to something else to change that template on the fly. So here for example, I have a dropdown list that shows me the two options, Tank A and Tank B. If I look in my templates, I have two, Tank A and Tank B. Both templates have the exact same parameter, it has a value parameter. This only works if you have the same parameters on all the templates you're going to switch on. So since my have the same parameters, I can actually bind the template path of the template to the dropdown list here as an example. So I can bind the template path to a property, select my dropdown, get it "Selected String Value", press okay, and now I can actually change this template on the fly. If I go up here to my dropdown list in preview mode, I can select Tank B and you'll see it's showing me that template. Back to Tank A, it's showing me Tank A. Again, they both have the exact same parameters and that parameter is called "value". It's linked to a tag here on the screen, but I can switch exactly which template behind the scenes I'm working with.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.