Grasshopper API
GH_DocumentGH_UndoUtilCreateReplaceStateEvent Method |
Create a new undo record for a single solution state addition.
Namespace: Grasshopper.Kernel
Assembly: Grasshopper (in Grasshopper.dll)

public GH_UndoRecord CreateReplaceStateEvent( string name, int stateIndex, GH_State oldState, GH_State newState )
Public Function CreateReplaceStateEvent ( name As String, stateIndex As Integer, oldState As GH_State, newState As GH_State ) As GH_UndoRecord
Parameters
- name
- Type: SystemString
Name of undo record. - stateIndex
- Type: SystemInt32
Index of state. - oldState
- Type: Grasshopper.KernelGH_State
Solution state to remove. - newState
- Type: Grasshopper.KernelGH_State
Solution state to insert.
Return Value
Type: GH_UndoRecordA newly created undo record.
