Std Undo: Difference between revisions

From FreeCAD Documentation
(Revised.)
No edit summary
Line 41: Line 41:
* The Undo/Redo functionality can be disabled by setting {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → UsingUndo}} to {{FALSE}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].
* The Undo/Redo functionality can be disabled by setting {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → UsingUndo}} to {{FALSE}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].
* The maximum number of Undo/Redo steps is controlled by {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → MaxUndoSize}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].
* The maximum number of Undo/Redo steps is controlled by {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → MaxUndoSize}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].

==Scripting==

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

To undo the last action use the {{incode|undo}} method of the document object.

</translate>
{{Code|code=
import FreeCAD

FreeCADGui.ActiveDocument.undo()
}}
<translate>


<!--T:10-->
<!--T:10-->

Revision as of 18:21, 21 March 2020

Std Undo

Menu location
Edit → Undo
Workbenches
All
Default shortcut
Ctrl+Z
Introduced in version
-
See also
Std Redo

Description

The Std Undo command undoes the last action.

Usage

  1. There are several ways to invoke the command:
    • Press the Std Undo button.
    • Select the Edit → Undo option from the menu.
    • Use the keyboard shortcut: Ctrl+Z.

Options

  • To undo multiple actions click on the black down arrow to the right of the Std Undo button and select from the list.

Preferences

  • The Undo/Redo functionality can be disabled by setting Tools → Edit parameters... → BaseApp → Preferences → Document → UsingUndo to false. This setting can also be changed in the Preferences Editor.
  • The maximum number of Undo/Redo steps is controlled by Tools → Edit parameters... → BaseApp → Preferences → Document → MaxUndoSize. This setting can also be changed in the Preferences Editor.

Scripting

See also: FreeCAD Scripting Basics.

To undo the last action use the undo method of the document object.

import FreeCAD

FreeCADGui.ActiveDocument.undo()