--- title: "system.nav.closeWindow" description: "Given a window path, or a reference to a window itself, it will close the window." --- # system.nav.closeWindow > Given a window path, or a reference to a window itself, it will close the window. 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](projects\project-properties\project-properties.md#client---permissions) restrictions. ## Syntax #1 `system.nav.closeWindow(window)` ### Parameters |Type|Parameter|Description| |--|--|--| |FPMIWindow| `window` |A reference to the window to close.| ### Returns Nothing ### Scope Client ## Syntax #2 `system.nav.closeWindow(windowPath)` ### Parameters |Type|Parameter|Description| |--|--|--| |String |`windowPath` |The path of a window to close.| ### Returns Nothing ### Scope Client ## Code Examples ```python title="Code Snippet" # This example would get the window named 'Overview' and then close it. # If the window isn't open, show a warning try: window = system.gui.getWindow('Overview') system.nav.closeWindow(window) except ValueError: system.gui.warningBox("The Overview window isn't open") ``` ```python title="Code Snippet" # 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') ```