GH_Document.GH_UndoUtil

References
This class is emitted by the Undo property of a GH_Document instance.

Methods

CreateAddObjectEvent

#
Create a new undo record for a bunch of object additions.
public GH_UndoRecord CreateAddObjectEvent(
name,
Name of undo record.
objs
Objects to be added.
)
A newly created undo record.

CreateAddObjectEvent

#
Create a new undo record for a single object addition.
public GH_UndoRecord CreateAddObjectEvent(
name,
Name of undo record.
obj
Object to be added.
)
A newly created undo record.

CreateAddStateEvent

#
Create a new undo record for a single solution state addition.
public GH_UndoRecord CreateAddStateEvent(
name,
Name of undo record.
stateIndex,
Index of state.
state
Solution state.
)
A newly created undo record.

CreateEnabledEvent

#
Create a new undo record for an object enabled change. This function must be called before the enabled flag is changed.
public GH_UndoRecord CreateEnabledEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
A newly created undo record.

CreateGenericObjectEvent

#
Create a new undo record for a generic, single object change.
public GH_UndoRecord CreateGenericObjectEvent(
name,
Name of undo record.
obj
Object to be recorded.
)
A newly created undo record.

CreateLayoutEvent

#
Create a new undo record for a bunch of object layout changes. This function must be called before the layouts are changed.
public GH_UndoRecord CreateLayoutEvent(
name,
Name of undo record.
objs
Target objects for undo record.
)
A newly created undo record.

CreateLayoutEvent

#
Create a new undo record for a single object layout change. This function must be called before the layout is changed.
public GH_UndoRecord CreateLayoutEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
A newly created undo record.

CreateNickNameEvent

#
Create a new undo record for an object nickname change. This function must be called before the nickname is changed.
public GH_UndoRecord CreateNickNameEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
A newly created undo record.

CreatePersistentDataEvent<T>

#
Create a new undo record for a single object persistent data change.
public GH_UndoRecord CreatePersistentDataEvent<T>(
name,
Name of undo record.
obj
Object to be recorded.
)
A newly created undo record.

CreatePivotEvent

#
Create a new undo record for a bunch of pivot changes. This function must be called before the pivots are changed.
public GH_UndoRecord CreatePivotEvent(
name,
Name of undo record.
objs
Target objects for undo record.
)
A newly created undo record.

CreatePivotEvent

#
Create a new undo record for a single pivot change. This function must be called before the pivot is changed.
public GH_UndoRecord CreatePivotEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
A newly created undo record.

CreatePreviewEvent

#
Create a new undo record for an object preview change. This function must be called before the preview is changed.
public GH_UndoRecord CreatePreviewEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
A newly created undo record.

CreateRemoveObjectEvent

#
Create a new undo record for a bunch of object removals.
public GH_UndoRecord CreateRemoveObjectEvent(
name,
Name of undo record.
objs
Objects to be removed.
)
A newly created undo record.

CreateRemoveObjectEvent

#
Create a new undo record for a single object removal.
public GH_UndoRecord CreateRemoveObjectEvent(
name,
Name of undo record.
obj
Object to be removed.
)
A newly created undo record.

CreateRemoveStateEvent

#
Create a new undo record for a single solution state removal.
public GH_UndoRecord CreateRemoveStateEvent(
name,
Name of undo record.
stateIndex,
Index of state.
state
Solution state.
)
A newly created undo record.

CreateReplaceStateEvent

#
Create a new undo record for a single solution state addition.
public GH_UndoRecord CreateReplaceStateEvent(
name,
Name of undo record.
stateIndex,
Index of state.
oldState,
Solution state to remove.
newState
Solution state to insert.
)
A newly created undo record.

CreateWireEvent

#
Create a new undo record for a set of Connector wire changes. This function must be called before the wires are changed.
public GH_UndoRecord CreateWireEvent(
name,
Name of undo record.
params
Target parameters for undo record.
)
A newly created undo record.

CreateWireEvent

#
Create a new undo record for a set of Connector wire changes. This function must be called before the wires are changed.
public GH_UndoRecord CreateWireEvent(
name,
Name of undo record.
param
Target object for undo record.
)
A newly created undo record.

MergeRecords

#
Attempt to merge the N most recent records into one. The name of the merged record will be identical to the name of the oldest record.
public bool MergeRecords(
count
Number of most recent records to merge.
)
True if merge was successful.

RecordAddObjectEvent

#
Create and Record a new ObjectAdded undo record.
public Guid RecordAddObjectEvent(
name,
Name of undo record.
objs
Target objects for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordAddObjectEvent

#
Create and Record a new ObjectAdded undo record.
public Guid RecordAddObjectEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordAddStateEvent

#
Create and Record a new CreateAddStateEvent undo record.
public Guid RecordAddStateEvent(
name,
Name of undo record.
stateIndex,
Index of state.
state
Solution state.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordEnabledEvent

#
Create and Record a new EnabledChanged undo record.
public Guid RecordEnabledEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordEvent

#
Add a new record to the undo stack of the owner document.
public Guid RecordEvent(
record
Undo record to add.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordEvent

#
Add a new record to the undo stack of the owner document.
public Guid RecordEvent(
name,
Name of undo record.
actions
Undo actions.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordEvent

#
Add a new record to the undo stack of the owner document.
public Guid RecordEvent(
name,
Name of undo record.
action
Undo action.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordEvent

#
Add a new record to the undo stack of the owner document.
public Guid RecordEvent(
name,
Name of undo record.
params IGH_UndoAction[]
actions
Undo actions.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordGenericObjectEvent

#
Create and Record a new ObjectChanged undo record.
public Guid RecordGenericObjectEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordLayoutEvent

#
Create and Record a new LayoutChanged undo record.
public Guid RecordLayoutEvent(
name,
Name of undo record.
objs
Target objects for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordLayoutEvent

#
Create and Record a new LayoutChanged undo record.
public Guid RecordLayoutEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordNickNameEvent

#
Create and Record a new NickNameChanged undo record.
public Guid RecordNickNameEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordPersistentDataEvent<T>

#
Create and Record a new PersistentDataChanged undo record.
public Guid RecordPersistentDataEvent<T>(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordPivotEvent

#
Create and Record a new PivotChanged undo record.
public Guid RecordPivotEvent(
name,
Name of undo record.
objs
Target objects for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordPivotEvent

#
Create and Record a new PivotChanged undo record.
public Guid RecordPivotEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordPreviewEvent

#
Create and Record a new PreviewChanged undo record.
public Guid RecordPreviewEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordRemoveObjectEvent

#
Create and Record a new ObjectRemoved undo record.
public Guid RecordRemoveObjectEvent(
name,
Name of undo record.
objs
Target objects for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordRemoveObjectEvent

#
Create and Record a new ObjectRemoved undo record.
public Guid RecordRemoveObjectEvent(
name,
Name of undo record.
obj
Target object for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordRemoveStateEvent

#
Create and Record a new CreateRemoveStateEvent undo record.
public Guid RecordRemoveStateEvent(
name,
Name of undo record.
stateIndex,
Index of state.
state
Solution state.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordReplaceStateEvent

#
Create and Record a new CreateReplaceStateEvent undo record.
public Guid RecordReplaceStateEvent(
name,
Name of undo record.
stateIndex,
Index of state.
oldState,
Solution state to remove.
newState
Solution state to insert.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordWireEvent

#
Create and Record a new WiresChanged undo record.
public Guid RecordWireEvent(
name,
Name of undo record.
params
Target parameters for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.

RecordWireEvent

#
Create and Record a new WiresChanged undo record.
public Guid RecordWireEvent(
name,
Name of undo record.
param
Target parameter for undo record.
)
The ID of the newly added undo record or Guid.Empty on failure.