system.util
Utility Functions
The following functions give you access to view various Gateway and Client data, as well as interact with other various systems.
📄️ audit
Inserts a record into an audit profile.
📄️ beep
Tells the computer where the script is running to make a "beep" sound.
📄️ execute
Executes the given commands via the operating system, in a separate process.
📄️ exit
Exits the running client, as long as the shutdown intercept script doesn't cancel the shutdown event.
📄️ getAvailableLocales
Returns a collection of strings representing the Locales added to the Translation Manager, such as 'en' for English.
📄️ getAvailableTerms
Returns a collection of available terms defined in the translation system.
📄️ getClientId
Returns a hex-string that represents a number unique to the running client's session.
📄️ getConnectionMode
Retrieves this client session's current connection mode.
📄️ getConnectTimeout
Returns the connect timeout in milliseconds for all client-to-gateway communication.
📄️ getEdition
Returns the "edition" of the Vision client - "standard", "limited", or "panel".
📄️ getGatewayAddress
Returns the address of the Gateway that the Client is currently communicating with.
📄️ getGatewayStatus
Returns a string that indicates the status of the Gateway.
📄️ getGlobals
This method returns a dictionary that provides access to the legacy global namespace.
📄️ getInactivitySeconds
Returns the number of seconds since any keyboard or mouse activity.
📄️ getLocale
Returns the current string representing the user's Locale, such as 'en' for English.
📄️ getLogger
Returns a Logger object that can be used to log messages to the console.
📄️ getModules
Returns a dataset of information about each installed module.
📄️ getProjectName
Returns the name of the project that is currently being run.
📄️ getProperty
Retrieves the value of a named system property.
📄️ getReadTimeout
Returns the read timeout in milliseconds for all client-to-gateway communication.
📄️ getSessionInfo
Returns a PyDataSet holding information about all of the open Designer sessions and Vision Clients.
📄️ getSystemFlags
Returns an integer that represents a bit field containing information about the currently running system.
📄️ getVersion
Returns the Ignition version number that is currently being run.
📄️ invokeAsynchronous
Invokes (calls) the given Python function on a different thread.
📄️ invokeLater
Invokes (calls) the given Python function object after all of the currently processing and pending events are done being processed, or after a specified delay.
📄️ jsonDecode
Takes a JSON string and converts it into a Python object such as a list or a dictionary.
📄️ jsonEncode
Takes a Python object such as a list or dictionary and converts into a JSON string.
📄️ modifyTranslation
This function allows you to add or modify a global translation.
📄️ playSoundClip
Plays a sound clip from a wav file to the system's default audio device.
📄️ queryAuditLog
Queries an audit profile for audit history.
📄️ retarget
This function allows you to programmatically 'retarget' a Vision Client to a different project and/or different Gateway.
📄️ sendMessage
This function sends a message to clients running under the Gateway, or to a project within the Gateway itself.
📄️ sendRequest
This function sends a message to the Gateway, working in a similar manner to the sendMessage function, except sendRequest expects a response to the message.
📄️ sendRequestAsync
This function sends a message to the Gateway and expects a response.
📄️ setConnectionMode
Sets the connection mode for the client session.
📄️ setConnectTimeout
Sets the connect timeout for Client-to-Gateway communication.
📄️ setLocale
Sets the user's current Locale.
📄️ setLoggingLevel
Sets the logging level on the given logger.
📄️ setReadTimeout
Sets the read timeout for Client-to-Gateway communication.
📄️ threadDump
Creates a thread dump of the current running JVM.
📄️ translate
This function allows you to retrieve the global translation of a term from the translation database using the current locale.
Functions by Scope
- audit
- beep
- execute
- exit
- getAvailableLocales
- getAvailableTerms
- getClientId
- getConnectTimeout
- getConnectionMode
- getEdition
- getGatewayAddress
- getGatewayStatus
- getGlobals
- getInactivitySeconds
- getLocale
- getLogger
- getProjectName
- getProperty
- getReadTimeout
- getSessionInfo
- getSystemFlags
- getVersion
- invokeAsynchronous
- invokeLater
- jsonDecode
- jsonEncode
- modifyTranslation
- playSoundClip
- queryAuditLog
- retarget
- sendMessage
- sendRequest
- sendRequestAsync
- setConnectTimeout
- setConnectionMode
- setLocale
- setLoggingLevel
- setReadTimeout
- threadDump
- translate