Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 7
Next »
This feature is new in Ignition version
8.0.3
Click here to check out the other new features
This function is used in Python Scripting.
Closes the Perspective Session with the given session ID or the current session if no ID is provided. If a message is provided, it is displayed on the page when the session closes. Otherwise the default message (set in the Project Properties) is displayed.
system.perspective.closeSession(message, sessionId)
None
Perspective Session
close(message)
Additionally, if you can get the session object in a script, then you can call close() to close the session, optionally with a message. For more information, see Object Traversal.
None
Perspective Session
# Closes the session with the given sessionId.
system.perspective.closeSession('Your Session has ended.','2e1c98a8-182e-43ce-84e8-a71d441c2cce')
# Closes the session with the sessionId retrieved from a component method.
# This can be called from any component in a view
session = self.view.session
session.close('This session is closing.')