Detect Ignition 8.0 or 7.9 in script

Is there a way to detect in Gateway/Client script if the version is Ignition 8.0 or Ignition 7.9

You could try calling SRContext.get() and see if it fails maybe? For the gateway, anyway…

Unless there are plans to go to Jython 2.7 in 7.9.x, why not check the Jython version?

def checkVersion():
	# returns major and minor version numbers.
	import sys
	return '.'.join([str(x) for x in sys.version_info[:2]])

print checkVersion()

2 Likes

Oooh, clever.

The clients do have the [System]Client/System/FPMIVersion tag, if you really need the Ignition version number, but there’s no similar tag for the gateway. It’s why I went with checking the Jython version.

1 Like

Yes ! Jordan’s Magic tips are back !
Thanks a lot

1 Like