GH_Document.GH_UndoUtil.CreateReplaceStateEvent Method

GH_DocumentGH_UndoUtilCreateReplaceStateEvent Method

Create a new undo record for a single solution state addition.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
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_UndoRecord
A newly created undo record.
See Also