Get Default Scripting Project

Is it possible to get the default scripting project through the SDK?

Sure, with a GatewayContext you can do:

context.getSystemProperties().getGatewayScriptingProject()
2 Likes

I actually found something similar about 2 seconds before you commented this, I didnt realize there was a search bar in the java docs!

Will that reliably return the same as this?

com.inductiveautomation.ignition.common.script.ScriptContext#defaultProject()

No, they aren’t the same thing. The call from ScriptContext will often be the name of the project currently executing something.

1 Like