Creating new window with a script

I would like to dynamically create a new window with a script. If someone can give me some advises how to achieve that. Thank you!

Without knowing a lot more details about what all you’re trying to load on to the window, that’s a really hard to answer question! That said, I’d search around on how to use the paintable canvas. The details of its use go WAY beyond my understanding, but you can do a lot of cool things with it including dynamic creation of objects. So as a broad answer, you’d make a blank window, put the paintable canvas on it and then use scripts to tell it what you wanted to load dynamically.

You can use the Template Canvas component to dynamically create windows at runtime. See my blog post here to find out how to do that: … at-runtime


basically what I want to achieve is the same if you do a right click on Windows in project browser and click Main Window (in designer).

But I want to achieve that in run time. Let’s say that I want a button on which I will click (in run time) and I will get a new Window instance in the designer.

You really don’t want to go there. That would require manipulating Ignition’s deliberately undocumented and unsupported internal project resources. You wouldn’t be able to trust your code working through even a bugfix version update.

If you desperately need this, you’ll want to start here in the JavaDocs. Good luck, and don’t say you weren’t warned. /-:

Just to really understand your end goal here, what are you desiring to accomplish after you create a new screen, like what are you wanting the screen to actually display?