Reversing Actions

This task shows you how to reverse actions.
  1. Open at least one object and perform actions that can be reversed.

    In this scenario, the object looks like this:
  2. Click Undo in the Standard toolbar or select Edit > Undo xxx (or press CTRL+Z), "xxx" corresponding to the name of the last action performed.

    This cancels the action.
  3. If you want to reverse one or more actions preceding the last one you simply have to repeat step 1.

    Sometimes no action can be undone. When this is the case, the command is grayed out.

    By default, a maximum of 10 global undo actions is possible. This maximum can be changed in Tools > Options > General > PCS.

  4. If you want to display an history of actions that can be reversed in the active document, click Undo with history :

    The name of the document in which you are about to reverse actions is displayed at the top of the dialog box (where you can see "Search1.CATProduct").

    The Undo with history dialog box lets you choose the actions you wish to reverse from the numbered list displayed in the bottom part, the most recently performed action being displayed at the top of the list.

    Each action is identified by its name, for instance "Properties Edition" refers to Edit > Properties.

    When you run a command or or when you start editing an object, you start a global action. Such action is identified in the Undo with history dialog box by a name beginning with "Start" (e.g. "Start line definition...", "Start Edition : Part xxx, etc.).
    Inside a command, you perform internal transitions and some of them are displayed in the Undo with history dialog box with a name ending with "..." to distinguish them from global commands (e.g. "Select search results...").
    Once a command is over, local actions are committed and replaced in the Undo with history dialog box by a global action representing everything you did while running the command.
    Note that a global action can sometimes be seen as a local action from a more global point of view: this is the case, for instance, for an exclusive command performed while editing, or for a shared command used while running another command.

    You can reverse then recovero internal transitions as long as you are in the command. If several Undo actions are performed successively until the command's starting action is reversed, the command itself is reversed.

    For instance, suppose the following scenario with two different cases:

    • step 1: copy an object
    • step 2: paste the object
    • step 3: select the object then move it

    Case 1
    Click Undo: this moves the object back to its original position in step 2.
    Click Redo: this moves the object to the location defined in step 3.
    You can reverse then recover the move since you are still in the Select command.

    Case 2
    Click Undo: this moves the object back to its original position in step 2.
    Click Undo once again: the paste action is canceled and you go back to step 1.
    Click Redo: the object is pasted.
    But you cannot recover step 3 after this and if you display the history, you can see that it is empty. You cannot recover the move because the second reversal impacts the Paste command and not the Select command anymore.

    If you want to reverse the first action only, simply click Undo because the first action is already highlighted in the list: the action is reversed and removed from the history.
    If you want to reverse the first four actions, all you need to do is click the last action to be reversed (i.e. the fourth one in our example): clicking an action implies that all former actions are selected as well and thus, reversed in order to keep the history.
    If you change your mind and decide to reverse the first two actions instead, click the second action in the list: only the first two actions are selected and not the first four anymore.
    Bear in mind that one history is used per document ; the history of actions is not forwarded from one document to another. As a consequence, reversing actions in a document opened several times simultaneously (e.g. when opening a CATPart and a CATProduct containing this CATPart) may corrupt data. It is recommended not to reverse actions in a document that has been modified in another window.
  5. When satisfied with your selection, click Undo to reverse all the selected actions.The dialog box stays open and you can keep on reversing actions.
    In this scenario, "Line definition" has been selected which means that the line and offset creation has been reversed. The result now looks like this:

  6. To close the Undo with history dialog box, click Close.

 

More about the Undo capability
 

  • The Select command is specific: as this is the default command in many cases, no starting action is stored in the Undo stack and therefore, this command cannot be stopped unless you run another exclusive command. However, like other commands, every local action (including shared commands) performed while running the Select command is committed when another exclusive command is run
  • Clicking Cancel in a dialog box should trigger the undo mechanism, i.e. any action you may have performed between the command creation and the click on Cancel is reversed
  • Clicking Undo cancels the last action only (i.e. the last single click) and therefore, if a command has been run by double-clicking, it cannot be reversed via Undo
  • You can undo the UI-Activation of an object, however this also cancels any other action performed during the object activation
  • UI-Activation (User-Interface Activation) means that you edit or double-click an object in order to make it UI-Active (User-Interface Active). The UI-Active object appears in blue color in the specification tree
  • Clicking Undo does not enable you to restore the default settings (after changing them via Tools > Options). This can only be done using Reset displayed at the bottom of the Options dialog box. For more information, refer to Resetting Default Settings Without Locks.