Perspective scripts run in the gateway, so you’d need the GatewayContext (aka IgnitionGateway) instead of the VisionClientContext you get from a component. The rest would be the same.
The get method is on IgnitionGateway, a deliberately undocumented internal "implementation" class. The static getter on it is a big code-purity no-no, but mostly okay for our environment.
If you're using Ignition Extensions, there's a system.util.context getter already. The generic equivalent of IgnitionGateway in the designer is the IgnitionDesigner (or something like that) class, which has a static getFrame method that returns the instance.
Note that relying on any of these is at least a code smell to be aware, since theoretically any of these methods could go away on any Ignition upgrade.
Cool, i forgot about the system.util.context function, cheers. This is purely for dev stuff, like summarising tags per provider, so if it breaks it only inconveniences me
I also added system.util.toolkitCtx() to my Integration Toolkit module to get the module context (which a wrapped gateway, designer, or vision client context).
Hi, Are you able to fetch the tag provider details in perspective, I'm also having a similar kind of requirement, Does anyone find any scripts for the same?