Std CloseActiveWindow: Difference between revisions

From FreeCAD Documentation
No edit summary
(Marked this version for translation)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:8-->
{{Docnav
{{Docnav
|[[Std_Open|Std Open]]
|[[Std_Open|Std Open]]
Line 21: Line 22:
==Description== <!--T:3-->
==Description== <!--T:3-->


<!--T:9-->
The '''Std CloseActiveWindow''' command closes the active document.
The '''Std CloseActiveWindow''' command closes the active document.


==Usage== <!--T:6-->
==Usage== <!--T:6-->


<!--T:10-->
# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Select the {{MenuCommand|File → Close}} option from the menu.
#* Select the {{MenuCommand|File → Close}} option from the menu.
Line 32: Line 35:
#* Press the {{Button|Discard}} button to discard the document and lose all changes.
#* Press the {{Button|Discard}} button to discard the document and lose all changes.


==Options==
==Options== <!--T:11-->


<!--T:12-->
* If the active document has not been saved: press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.
* If the active document has not been saved: press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.


==Notes==
==Notes== <!--T:13-->


<!--T:14-->
* A document can also be closed by right clicking it in the [[Tree_view|Tree view]] and selecting {{MenuCommand|Close document}} from the context menu.
* A document can also be closed by right clicking it in the [[Tree_view|Tree view]] and selecting {{MenuCommand|Close document}} from the context menu.


==Preferences==
==Preferences== <!--T:15-->


<!--T:16-->
* The last used file location is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath}}.
* The last used file location is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath}}.


==Scripting==
==Scripting== <!--T:17-->


<!--T:18-->
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:19-->
To close a document use the {{incode|closeDocument}} method of the FreeCAD application. For a scripting example see [[Std_New|Std New]].
To close a document use the {{incode|closeDocument}} method of the FreeCAD application. For a scripting example see [[Std_New|Std New]].


<!--T:20-->
{{Docnav
{{Docnav
|[[Std_Open|Std Open]]
|[[Std_Open|Std Open]]

Revision as of 21:14, 23 March 2020

Std CloseActiveWindow

Menu location
File → Close
Workbenches
All
Default shortcut
Ctrl+F4
Introduced in version
-
See also
Std CloseAllWindows

Description

The Std CloseActiveWindow command closes the active document.

Usage

  1. There are several ways to invoke the command:
    • Select the File → Close option from the menu.
    • Use the keyboard shortcut: Ctrl+F4.
  2. If the active document has not been saved a dialog box will prompt you to save it:
    • Press the Save button to save the document. If required enter a filename first.
    • Press the Discard button to discard the document and lose all changes.

Options

  • If the active document has not been saved: press Esc or the Cancel button to abort the command.

Notes

  • A document can also be closed by right clicking it in the Tree view and selecting Close document from the context menu.

Preferences

  • The last used file location is stored: Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath.

Scripting

See also: FreeCAD Scripting Basics.

To close a document use the closeDocument method of the FreeCAD application. For a scripting example see Std New.