# Action class

Namespace: [Grasshopper2.Undo](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.undo.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class Action : IStorable
```

A single undoable/redoable action. [Action](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action.md)s are combined into [Record](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.record.md)s in order to be timestamped, named and joined.

**Derived types:** [ConnectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.connectaction.md), [CreateObjectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.createobjectaction.md), [DeleteObjectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.deleteobjectaction.md), [DisconnectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.disconnectaction.md), [ObjectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction.md), [PinAttachAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.pinattachaction.md), [PinDetachAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.pindetachaction.md), [PlaceObjectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.placeobjectaction.md), [ReplaceObjectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.replaceobjectaction.md)

## Constructors

- [Action](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/ctor.md): (2 overloads)

## Properties

- [Response](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/response.md): Gets the automatic response required by this action.
- [State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/state.md): Gets the state this action is in.

## Methods

- [Extends](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/extends.md): Override this method to indicate this action extends another action, and can thus be dropped from a sequence of actions.
- [PerformRedo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performredo.md): Redo this action. This is only allowed if the [Action.State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/state.md) equals [State.Redo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.state.md).
- [PerformRedoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performredointernal.md)
- [PerformUndo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performundo.md): Undo this action. This is only allowed if the [Action.State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/state.md) equals [State.Undo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.state.md).
- [PerformUndoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performundointernal.md)
- [PrepareRedo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareredo.md): Run the preperatory work for a redo operation. The [Action.PerformRedo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performredo.md) method ought never be called without a preceding call to [Action.PrepareRedo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareredo.md), although note that a call to [Action.PrepareRedo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareredo.md) is not necessarily followed by a call to [Action.PerformRedo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performredo.md).
- [PrepareRedoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareredointernal.md)
- [PrepareUndo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareundo.md): Run the preperatory work for an undo operation. The [Action.PerformUndo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performundo.md) method ought never be called without a preceding call to [Action.PrepareUndo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareundo.md), although note that a call to [Action.PrepareUndo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareundo.md) is not necessarily followed by a call to [Action.PerformUndo(Document)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performundo.md).
- [PrepareUndoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareundointernal.md)
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/store.md)
