Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
New_in
Version8.0.7


Scripting_function


Panel
titleDescription

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:



Panel
titleClient Permission Restrictions

This scripting function has no Client Permission restrictions.

Panel
titleSyntax

system.util.getVersion()

  • Parameters

none

  • Returns

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

  • Scope

Gateway, Vision Client, Perspective Session

Panel

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
Panel
titleCode Examples
Code Block
languagepy
titleCode 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())
Panel
Code Block
languagepy
titleCode 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) 
Panel
titleKeywords

system util getVersion, util.getVersion