Std Undo: Difference between revisions

From FreeCAD Documentation
(Undo revision 935831 by Evgeniy (talk))
Tag: Undo
(Marked this version for translation)
 
(3 intermediate revisions by 2 users not shown)
Line 37: Line 37:


<!--T:17-->
<!--T:17-->
* To undo multiple actions click on the small black down arrow to the right of the {{Button|[[Image:Std_Undo.svg|16px]] [[Std_Undo|Std Undo]]}} button and select return step from the list.
* To undo multiple actions click on the small black down arrow to the right of the {{Button|[[Image:Std_Undo.svg|16px]] [[Std_Undo|Std Undo]]}} button and select from the list.


==Preferences== <!--T:18-->
==Preferences== <!--T:18-->
Line 60: Line 60:
}}
}}
<translate>
<translate>

<!--T:23-->
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.

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

FreeCAD.ActiveDocument.UndoMode = 1
}}
<translate>



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

Latest revision as of 11:57, 12 December 2021

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 small 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, but this is not recommended. 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

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