--- title: "system.vision.getWindow" description: "Finds a reference to an open window with the given name." --- # system.vision.getWindow > Finds a reference to an open window with the given name. :::info Backwards Compatibility This function replaces [system.gui.getWindow](versioned_docs/version-8.1/appendix/scripting-functions/system-gui/system-gui-getWindow.md). Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. ::: This function is used in **Python Scripting**. ## Description Finds a reference to an open window with the given name. Throws a ValueError if the named window is not open or not found. :::note This function is available on secondary desktops via the [system.vision.desktop](system-vision-desktop.md) function. See the [Multi-Monitor Clients](ignition-modules\vision\common-tasks-in-vision\multi-monitor-clients\multi-monitor-clients.md) page for more details on secondary desktops. ::: ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.vision.getWindow(name)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String| `name` | The path to the window to field. ### Returns **Window** - A reference to the [window](appendix\components\vision-components\vision-window-object\vision-window-object.md) object, if it was open. ### Scope Vision Client ## Code Examples ```python title="Example #1" # This example will get the window named 'Overview' and then close it. try: window = system.vision.getWindow('Overview') system.vision.closeWindow(window) except ValueError: system.vision.showWarning("The Overview window isn't open") ``` ```python title="Example #2" # This example will set a value on a label component in the 'Header' window. try: window = system.vision.getWindow('Header') window.getRootContainer().getComponent('Label').text = "Machine 1 Starting" except ValueError: system.vision.showWarning("The Header window isn't open") ```