Skip to main content
Version: 8.1

system.util.getVersion

This function is used in Python Scripting.

Description​

Returns the Ignition version number that is currently being run.

note

If the version is from a nightly build or developer version that is not yet released, the version number will come back as "Dev Version", for example:

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.util.getVersion()

Parameters​

Nothing

Returns​

Version - The currently running Ignition version number, as a Version object.

Scope​

Gateway, Vision Client, Perspective Session

The following table documents available attributes on the object.

Method and/or AttributeDescriptionReturn Type
.majorReturns only the major version number.
8.0.2 returns 8
Integer
.minorReturns only the minor version number.
8.0.2 returns 0
Integer
isFutureVersion()Takes in a string version number and returns whether the current version is greater than the given version (true or false). Note: this does account for Snapshot, RC or Beta versions.
Version format expected: "X.X.X" ie "8.0.7" See example below.
Boolean

Code Examples​

Example #1
# This code displays the name of the currently running Ignition version number.
system.gui.messageBox("You are running project: %s" % system.util.getVersion())
Example #2
# This code displays whether a given version is older than the current version.
currentVersion = system.util.getVersion()
testVersion = "8.0.7"
isFuture = currentVersion.isFutureVersion(testVersion)
print "Your version (%s) is older than %s: %s" %(currentVersion, testVersion, isFuture)

Keywords​

system util getVersion, util.getVersion