GuiCommand: Name: Std Undo MenuLocation: Edit , Undo Workbenches: All Shortcut: Ctrl+Z SeeAlso: Std_Redo
Std Undo
Description
The Std Undo command undoes the last action.
Usage
- There are several ways to invoke the command:
- Press the
Undo button.
- Select the Edit →
Undo option from the menu.
- Use the keyboard shortcut: Ctrl+Z.
- Press the
Options
- To undo multiple actions click on the small black down arrow to the right of the
Undo button and select from the list.
Preferences
See also: Preferences Editor.
- The Undo/Redo functionality can be disabled by unchecking the Edit → Preferences... → General → Document → Using Undo/Redo on documents option. But this is not recommended.
- The maximum number of Undo/Redo steps is controlled by Edit → Preferences... → General → Document → Maximum Undo/Redo steps.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To undo the last action use the undo
method of the document object. Its counterpart, the redo
method, is also available.
import FreeCAD
FreeCAD.ActiveDocument.undo()
When running FreeCAD in pure console mode (CLI), the undo/redo mechanism isn\'t enabled by default. It must be explicitly activated for each document.
import FreeCAD
FreeCAD.ActiveDocument.UndoMode = 1
⏵ documentation index > Std Undo
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Std_Undo.md