How to get Ignition install directory (OS agnostic)?

As in the title, how can I get the Ignition install directory that is OS agnostic?

Also, are the relative paths from this point onwards the same regardless of OS?
e.g. the Perspective projects directory, is this always:

No, it’s not necessarily relative to the install directory.

If you have a GatewayContext object you can get the data directory by calling getSystemManager().getDataDir().

1 Like


from com.inductiveautomation.ignition.gateway import IgnitionGateway
context = IgnitionGateway.get()
projectParentFolder = str(context.systemManager.dataDir.absoluteFile).replace('\\','/') + '/projects/'

Is this possible from the client scope in any way? I happen to need a version of this that would work from the script console.

Not unless you count sending a message to a message handler asking for the answer.

1 Like