Creating Windows Outside of Designer

I'm working on a solution to automatically create Vision windows in Ignition by generating the necessary JSON and resource files (like resource.json and resource.vwin). I'm placing these into the correct project folder structure, but when I open the project in the Designer, the windows show up as COM objects instead of proper Vision windows.

I suspect the issue might be related to the lastModificationSignature field in the resource.json file. From what I can tell, Ignition uses this to validate the integrity of the resource, and if it's missing or incorrect, the Designer doesn't recognize the file properly.

the window files aren't vwin, they're XML files.

Also, this is going to be....more complex than you expect.

2 Likes

.xml or .bin, depending on your project properties:

2 Likes

yea lol ive spent a lot longer on it already than i anticipated. Do you have any incite on how the windows are created? I am currently experimenting with a work around where i create a project with 1 window and copy the window modifying resource.json. Also using SHA-256 to generate the "lastModificationSignature": attribute.

lastModificationSignature is not used as a signal of whether or not to load a resource; it's only used to know whether the 'source' of the last change was Ignition or some external actor. It's also possible to precalculate to make "valid" modifications externally, but again, all that does is let Ignition know that the "actor" on the modification is accurate/correct.

If you're pushing resources to disk, you'll have to wait five minutes [1] for them to actually be picked up by the project system, or issue a call to system.project.requestScan.

As @Leor_Fishman noted - manually creating window files, even if you set the resource encoding to XML (essentially a prerequisite for this) is not an easy endeavour, and I've already given him much of this same advice.

Whatever you are actually trying to do may be better served by:

  1. Some existing capability in the software you're not taking full advantage of
  2. Saying no to this idea/requirement :smile:

  1. by default: Gateway and Gateway Network Parameters | Ignition User Manual â†Šī¸Ž

3 Likes

If it's the same window, but with different "parameters", for lack of a better term, consider using templates and indirect bindings (extra hint for free).

Yeah. This.

2 Likes