Std CloseActiveWindow: Difference between revisions

From FreeCAD Documentation
(Added 'Options'.)
(Undo revision 640782 by Roy 043 (talk))
Tag: Undo
Line 39: Line 39:


* 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==

{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

A document is closed with the {{incode|closeDocument}} method of the FreeCAD application. For a scripting example see [[Std_New|Std New]].


{{Docnav
{{Docnav

Revision as of 08:50, 16 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.

Preferences

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