Which scope is my code running in?

Hmm. Something like this (untested):

from com.inductiveautomation.ignition.common.model import ApplicationScope

scope = ApplicationScope.getGlobalScope()


if (ApplicationScope.isClient(scope)):
	...

if (ApplicationScope.isDesigner(scope)):
	...

if (ApplicationScope.isGateway(scope)):
	...
2 Likes