I am attempting to access some of the internals of the SQLTag tree… Namely to get a tag reference to access the ‘custom permissions’ table within it as this does not appear to be exposed in any other way (e.g. system.tag.getAttribute(), etc). There does not appear to be any global class instance (or at least one evident in the documentation) that would allow me to access the SQLTag system directly. From what I’ve figured, most at their highest level require digging from routines requiring a ClientContext or DesignerContext. This is fine when registering a module from the module system via the appropriate hook context (because it gets passed to your class). But how can one obtain this reference within a running script?
Am I to assume by no reply the answer is ‘no’!? There has to be some kind of getCurrentDesignerContext() or some such call I can make…
Actually it is possible. See the getContext function defined in this forum post: inductiveautomation.com/forum/v … 502#p41502
Keep in mind that Ignition modules have built-in functionality to ensure that they are installed in the correct versions of Ignition so they work correctly.
Python scripts do not have this. So it is possible to write Ignition module code in Python scripts in Ignition but there is a possibility that they break after upgrading Ignition. You may not know that a script is broken until something doesn’t work.
Thanks Nick, that’s precisely what I had been looking for. Not sure why my forum searches weren’t turning up your prior post. Oh well, I appreciate it. Thankfully this is an isolated situation so your warning is understood yet a limited concern. In looking at the code snippet, I was damn close. I see how you backed into the object references to get to the getContext() call and that was where I kept butting my head into the wall. I was trying to get some call to return it directly in lieu of the back-into it approach. Thanks, hopefully this will work for what I am looking to do!