Which is a pretty fair stance, but I figure if folks are already hacking things together based on "run this in the script console every time I launch the designer" or whatever this has got to be better than that.
But, yeah - this was much closer to a "huh, I think this would work" experiment than something I expect anyone to use in practice. Note I put the repo up 2 weeks ago and never got around to even making a real thread for it
Note my @runInClient function in my toolkit requires the target function exist in the project library. It could be in a global inherited project, and every leaf project could call it regularly in a gateway timer event to "push" it everywhere. But everything is defined in the gateway, and therefore auditable.
(BTW, can one of you admins add the vomit emoji to the list of post reaction options? I did that for another Discourse forum that I co-administer, and my peeps love it...)
On the contrary @pturmel, I actually like this idea. For tools that you've spent a lot of time building and don't wish to share with other integrators who might work on your projects, it's a pain importing the tools, installing them, and removing them (hopefully you remember to do this, and everyone else in your company who uses them also remembers to do this!).
Having these scripts live outside a gateway and a project is hugely beneficial! It also means when I make updates to the code, I don't have to import this into 20 projects. Consider myself fired from your team
And to this end, @paul-griffith, can I store a library of py scripts within the ../.ignition/designer-extensions/.. path and reference those in the event handlers (eg onProjectOpened)? Rather than storing the scripts in the project?
Edit: looks like I can use sys:
import sys
if "C:/temp" not in sys.path:
sys.path.append("C:/temp")
import testscript as ts
ts.testPrompt()
Very cool!
Edit: I wonder if I could store this on a network fileshare holding the latest repo so users don't even need the code on their laptops at all....