History
ReferencesProvides access to the undo/redo history of a Grasshopper document.
Properties
Methods
Do
#public void Do(Record record)
Adds a new undo node to this history as the primary child of the current FirstUndo node. The new node will automatically become the new FirstUndo node and the FirstRedo field will go blank.
Parameters:
| record (Record) | Record to add. |
Do
#Do
#Adds a new undo node to this history as the primary child of the current FirstUndo node. The new node will automatically become the new FirstUndo node and the FirstRedo field will go blank.
Parameters:
| name (VerbNoun) | |
| actions (ActionList) |
Do
#Adds a new undo node to this history as the primary child of the current FirstUndo node. The new node will automatically become the new FirstUndo node and the FirstRedo field will go blank.
Parameters:
| name (VerbNoun) | |
| actions (IEnumerable<Action>) |
Do
#FindCreationAction
#Find the youngest action in the central undo sequence which covers the creation of an object.
Parameters:
| instanceId (Guid) |
FindDeletionAction
#Find the youngest action in the central undo sequence which covers the deletion of an object.
Parameters:
| instanceId (Guid) |
FindDeletionRecord
#Find the youngest record in the central undo sequence which covers the deletion of an object.
Parameters:
| instanceId (Guid) |
Move
#Move a node to a new parent.
Parameters:
| nodes (Node[]) | Nodes to move. Each subsequent node in the array must be the primary child of the previous node. |
| link ((Node Parent, Node Child)) | The parent+child pair into which to move the nodes. |
| showStateWarning (bool) | If true, and if not already disabled by the user, and if applicable, shows the warning regarding the dangers of moving records in one state into a region with a different state. |
Redo
#public void Redo()
Redo
#public void Redo(Node node)
Perform all the steps required to redo a specific node.
Parameters:
| node (Node) |
RedoActionsOfType<T>
#Enumerate over all undo actions of a specific type in the central redo sequence.
Remove
#public void Remove(Node node)
Remove a node and all its secondary children from this history, and connect the primary child to the parent if possible.
Parameters:
| node (Node) |
ShowHistory
#Show the history of an existing canvas in a window.
Parameters:
| canvas (Canvas) |
Returns: Canvas to link to.
ShowHistory
#public Form ShowHistory(Window owner)
Show the full history in a window.
Parameters:
| owner (Window) |
Returns: Form containing the history browser.
Undo
#public void Undo()
Undo
#public void Undo(Node node)
Perform all the steps required to undo a specific node.
Parameters:
| node (Node) |
UndoActionsOfType<T>
#Enumerate over all undo actions of a specific type in the central undo sequence.
Events
Modified
#This event is raised whenever the topology of the history graph is changed. The Modified event always follows a more specific event such as NodeAdded, NodeMerged or NodeMoved.
NodeAdded
#This event is raised whenever a new node is added to the history. This event is always followed by the Modified event.
NodeMerged
#This event is raised whenever a node is merged with its primary child. This event is always followed by the Modified event.
NodeMoved
#This event is raised whenever a node and all its child nodes are moved from one location in the history to another. This event is always followed by the Modified event.