Skip to main content
Version: Deprecated Pages
View as Markdown

system.nav.closeWindow

Deprecated by system.vision variations in 8.3

This function was replaced with system.vision.closeWindow.

Click here to learn more about system.vision variations.

This function is used in Python Scripting.

Description​

Given a window path, or a reference to a window itself, it will close the window. If the window can't be found, this function will do nothing.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax #1 (FPMIWindow Param)​

system.nav.closeWindow(window)

Parameters​

TypeParameterDescription
FPMIWindowwindowA reference to the window to close.

Returns​

Nothing

Scope​

Vision Client

Syntax #2 (String Param)​

system.nav.closeWindow(windowPath)

Parameters​

TypeParameterDescription
StringwindowPathThe path of a window to close.

Returns​

Nothing

Scope​

Vision Client

Code Examples​

Example #1
# This example gets the window named 'Overview' and then closes it.
# If the window isn't open, a warning is shown.
try:
window = system.gui.getWindow('Overview')
system.nav.closeWindow(window)
except ValueError:
system.gui.warningBox("The Overview window isn't open")
Example #2
# This example would close the window named 'Overview' in one step.
# If the window isn't open, the call to closeWindow will have no effect
system.nav.closeWindow('Overview')