# GH_UndoOperation enum

Namespace: [Grasshopper.Kernel](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public enum GH_UndoOperation
```

Enumerates all possible types of undo operation.

## Values

| Name | Value | Description |
| --- | --- | --- |
| ClearUndoStack | 0 | The stack with all undo records has been cleared. |
| ClearRedoStack | 1 | The stack with all redo records has been cleared. This always happens when a new undo record is added. |
| RecordAdded | 2 | A new undo record is added to the list. There will be a ClearRedoStack event after this one. |
| RecordRemoved | 3 | A specific record has been deleted. This is not a typical operation and is usually due to user intervention. Removal can occur from both the undo and the redo stack. |
| Undo | 4 | An undo operation was successfully completed. This means a record has been moved from the undo stack to the redo stack. |
| Redo | 5 | A redo operation was successfully completed. This means a record has been moved from the redo stack back onto the undo stack. This does not count as a RecordAdded operation. |
