You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.

The following feature is new in Ignition version 8.0.7
Click here to check out the other new features
This function is used in Python Scripting.

Description

Returns the Ignition version number that is currently being run.

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

none

  • Returns

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

  • Scope

Gateway, Vision Client, Perspective Session

This section documents available attributes on the object.

Method and/or AttributeDescriptionReturn type
.major

Returns only the major version number.

8.0.2 returns 8

integer
.minor

Returns 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
Code Snippet
# This code would display the name of the currently running Ignition version number
system.gui.messageBox("You are running project: %s" % system.util.getVersion())
Code Snippet
# This code would display 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

  • No labels