templates shared between multiple projects
complete
S
Steve Perry
Sometimes, a template must be used in multiple projects on a single Ignition server (gateway). Inside the project where the template is created, we can presently right-click and "send to" in order to COPY the template to the other projects. However, no link between the template COPIES is maintained, so changing the template in one of the projects does not automatically change the template in the other projects.
Would be great to have a "shared templates" or "global template library" on each Ignition server (gateway), with each project able to reference and use the "shared templates".
Log In
j
jsorlie@tesla.com
oh, btw, obviously all projects using the globally shared template have to have identical [Client] tag configurations...
j
jsorlie@tesla.com
I noticed some caveats in using shared templates when the globally scoped template make reference to [Client] tags. Most constructions work just fine both in staging and then in published.
Curiously today I tried building a template to encapsulate a 2-State Toggle component. The idea is to pre-configure the component with the client tag that serves as the state memory for the toggle button. This construct works fine in staging, but not in the published client application. On the published screen, it shows a template icon in the upper left corner of the error overlay. This overlay error is not include in the documnentation ((https://docs.inductiveautomation.com/display/DOC79/Tag+Quality+and+Overlays)
To some extent I understand the difficulty of connecting the dots between global template definitions and their application instance use. What I find odd is that some cases work and some do not. I experimented with various work-around strategies, eg. using custom properties to centralize reference as well as use of expression scripted python -- runScript("system.tag.read('[Client]tagPath').value",0) -- to decouple direct binding dependencies. No such tricks worked.
I wonder if it could be a component-by-component restriction. Maybe the 2-State Toggle just doesn't lend it self to use in global template space.
S
Steve Perry
This same approach would be helpful for other project resources, such as images.
Right now, sharing the same image between projects on multiple gateways is difficult.
l
lionel MAZEYRAT
Global scope inside one gateway and a sync feature with EAM module for multiple gateway !