new GlobalUndo()
Manages global undo and redo for framework applications and their models.
This class provides a global undo/redo manager that interfaces with a range of
PD.UndoAction subclasses that handle the actual processes of undoing and redoing
themselves. The manager simply maintains the required lists, updates global state
whenever necessary and provides methods for recording various model actions.
Members
-
debouncedInProgressReset <static>
-
Sets the
undoRedoInProgressflag to false after allowing some time for async undo/redo actions to complete. -
:boolean
isActive <static>
-
Whether or not to record undo actions when state changes.
Use this property to pause or resume undo and redo activity within the application. When not active, new entries are not added to the queue.
Type
- boolean
-
:Array
redoQueue <static>
-
Stores a list of redoable actions that have been undone in the model.
Type
- Array
-
:number
timeLimit <static>
-
The time period within which multiple sequential instances of the same undo action may be merged together rather than being created as multiple separate entries.
This value is given in milliseconds and defaults to 4000 (4 secs). Acceptable values are in the range 0 (no merging) to 60000 (1 min). Whether or not an undo action can be updated as well as created is determined by the undo action class itself.
Type
- number
-
:Array
undoQueue <static>
-
Stores a list of undoable actions that have been applied to the model.
Type
- Array
Methods
-
addActionToUndoQueue(action) <static>
-
Adds an action to the undo queue.
This method adds the given action and does some housekeeping such as clearing the redo queue and checking the maximum size to avoid memory issues.
Parameters:
Name Type Description actionPD.UndoAction The action to add.
-
canRedo() <static>
-
Whether or not there are items in the redo queue.
-
canUndo() <static>
-
Whether or not there are items in the undo queue.
-
changeGlobalState(property, newValue) <static>
-
Sets the value of the given
PD.GlobalStateproperty after recording its current value and creating/updating an undo record.Use this method instead of
PD.GlobalUndo.recordGlobalStateChangeif you do not want to manage the recording of the existing value before setting the new value and recording the change.NOTE: In order to efficiently record the change in value, you must rely on this method to actually set the new value. If you change the global state property value before calling this method, its current value will be the same as the new value, so there will effectively be no value change to record.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a global state change of the same property within the current
time limit, then that entry will be updated with the new value instead of creating and adding a new entry.Parameters:
Name Type Description propertystring The global state property changing.
newValueany The new value to set.
-
checkElementPath(element) <static>
-
Check for a valid path, then update and recompute plane equation if needed.
If a path is planar, this will ensure that all its vertices are projected onto its plane each time it is updated. Rather than store the plane equation, we can simply recompute it from the path vertices whenever we undo/redo as they will have already been made coplanar.
Parameters:
Name Type Description elementBIM.Element The element whose path moved.
-
checkElementPath(element) <static>
-
Check for a valid path, then update and recompute plane equation if needed.
If a path is planar, this will ensure that all its vertices are projected onto its plane each time it is updated. Rather than store the plane equation, we can simply recompute it from the path vertices whenever we undo/redo as they will have already been made coplanar.
Parameters:
Name Type Description elementBIM.Element The element whose path moved.
-
checkTypeAndTime(item, type [, timeout]) <static>
-
Check if action item is of the given type and within the time limit.
Parameters:
Name Type Argument Description itemPD.UndoAction The undo action item to check.
typeany The
PD.UndoActionsubclass to check.timeoutnumber <optional>
The number of milliseconds back, defaults to
PD.GlobalUndo.timeLimit.Returns:
Returns true if item is same type and within the time limit.
- Type
- boolean
-
getLastUndoAction() <static>
-
Retrieves the last action item in the undo queue, if available.
Returns:
Returns the last undo action item.
- Type
- PD.UndoAction | undefined
-
getLastUndoActionOfTypeWithinTime(type [, timeout]) <static>
-
Retrieves the last action in the undo queue if it is the given type and within time limit.
This method is used when there is likely to be multiple changes in quick succession to the same property or parameter that you actually want merged into a single undo point. Simply pass the
PD.UndoActionsubclass you want to test for, as well as an optional timeout value in milliseconds and, if the last item in the undo queue matches those values, it is returned. If not, then anullvalue is returned.If you do not provide the optional timeout value, the
PD.GlobalUndo.timeLimitvalue will be used (which defaults to 4000ms (4 secs)). To ignore the timeout limit, simply set thetimeoutvalue to zero.Parameters:
Name Type Argument Description typeany The subclass of
PD.UndoActionto check.timeoutnumber <optional>
The number of milliseconds since updated, defaults to
PD.GlobalUndo.timeLimit.Returns:
Returns the last undo action item if matching, else null.
- Type
- PD.UndoAction | null
Example
MyClass.prototype.storeUndoPoint = function(property, oldValue, newValue) { if (PD.GlobalUndo.isActiveAndNotBusy()) { const last_item = PD.GlobalUndo.getLastUndoActionOfTypeWithinTime(MyClass.UndoAction); if (last_item && (last_item.property == property)) { last_item.timestamp = Date.now(); last_item.newValue = newValue; } /// Create new undo record. else PD.GlobalUndo.addActionToUndoQueue( new MyClass.UndoAction(this, property, oldValue, newValue) ); } }; -
isActiveAndNotBusy() <static>
-
Determines if the undo or redo action receptive to storing changes.
The result of this method depends on the
PD.GlobalUndo.isActiveproperty and and thePD.GlobalUndo.isUndoRedoInProgressmethod. Whilst an undo or redo command is in progress, the ability to add to or update items in the undo/redo queue is temporarily suspended to ensure that any changes that occur during an undo/redo don't generate any more undo/redo actions. -
isUndoRedoInProgress() <static>
-
Retrieves whether or not an undo or redo action being processed.
Whilst an undo or redo command is in progress, the ability to add to or update items in the undo/redo queue is temporarily suspended. As Undo and redo commands are atomic in nature, this should not otherwise affect your application, but ensures that any changes that occur during an undo/redo don't generate more undo/redo actions.
-
rebuildModel() <static>
-
Rebuilds the current model, checks for space overlaps, updates selection and generates a redraw.
Call this method after your undo/redo action makes any significant changes that affect the geometry of any element(s) in the model.
-
rebuildModel() <static>
-
A placeholder that the host application can reassign or override in order to update its internal model when an entity's parameters are changed.
Call this method after your undo/redo action makes any significant changes that affect the host application's internal model.
-
rebuildModelAndClearSelection() <static>
-
Rebuilds the model, clears the selection and generates a redraw.
Call this method if your undo/redo action creates a new element or changes the level, thus invalidating the current selection set.
-
rebuildModelAndClearSelection() <static>
-
Rebuilds the model, clears the selection and generates a redraw.
Call this method if your undo/redo action creates a new element or changes the level, thus invalidating the current selection set.
-
recordAddElements(elements) <static>
-
Records the addition of multiple element to the model.
Parameters:
Name Type Description elementsBIM.Element The list of elements that were just added.
-
recordAddElements(elements) <static>
-
Records the addition of multiple element to the model.
Parameters:
Name Type Description elementsBIM.Element The list of elements that were just added.
-
recordAndApplyCurveTypeChange(selection, curveType, id) <static>
-
Sets a new curve type for items in the selection set and records undo/redo info.
NOTE: Do not set the curve type of any junction in the selection set prior to calling this method. This method has the logic required to iterate over the given selection set and properly change each selected junction's curve type, prior to adding or updating the undoable action in the undo queue.
This method can be called multiple times, such as when a user is choosing different curve types in quick succession. If the last item in the undo queue is of the same type and the selection set identifier has not changed, then the last undo action will be updated to reflect the new changes. If the last item is a different type or has a different
idvalue, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
curveTypePD.CURVE The new curve type to set for junctions.
idnumber The numeric id of the move sequence.
Returns:
Returns true if any curve in the selection changed, otherwise false.
- Type
- boolean
-
recordAndApplyCurveTypeChange(selection, curveType, id) <static>
-
Sets a new curve type for items in the selection set and records undo/redo info.
NOTE: Do not set the curve type of any junction in the selection set prior to calling this method. This method has the logic required to iterate over the given selection set and properly change each selected junction's curve type, prior to adding or updating the undoable action in the undo queue.
This method can be called multiple times, such as when a user is choosing different curve types in quick succession. If the last item in the undo queue is of the same type and the selection set identifier has not changed, then the last undo action will be updated to reflect the new changes. If the last item is a different type or has a different
idvalue, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
curveTypePD.CURVE The new curve type to set for junctions.
idnumber The numeric id of the move sequence.
Returns:
Returns true if any curve in the selection changed, otherwise false.
- Type
- boolean
-
recordAndApplyElementRename(element, name) <static>
-
Records the renaming of an element.
Parameters:
Name Type Description elementBIM.Element The element being renamed.
namestring The new name for the element.
-
recordAndApplyJunctionOrientationChange(selection, rotation, id) <static>
-
Sets a new junction orientation for items in the selection set and records undo/redo info.
NOTE: Do not set the orientation of any junction in the selection set prior to calling this method. This method has the logic required to iterate over the given selection set and update each selected junction's orientation based on the given rotation angle, prior to adding or updating the undoable action in the undo queue.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
rotationnumber The relative rotation to apply to selected junctions.
idnumber The numeric id of the move sequence.
-
recordAndApplyJunctionOrientationChange(selection, rotation, id) <static>
-
Sets a new junction orientation for items in the selection set and records undo/redo info.
NOTE: Do not set the orientation of any junction in the selection set prior to calling this method. This method has the logic required to iterate over the given selection set and update each selected junction's orientation based on the given rotation angle, prior to adding or updating the undoable action in the undo queue.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
rotationnumber The relative rotation to apply to selected junctions.
idnumber The numeric id of the move sequence.
-
recordAndApplySelectionNudge(selection, vector, id) <static>
-
Records the keyboard-based nudging of a selection set, updating previous if
idis the same.This method is called when the user is in nudge mode, where pressing the X, Y or Z keys moves the current selection in increments equal to the current snap grid. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
vectorTHREE.Vector3 The relative vector to move the selection by.
idnumber The numeric id of the move sequence.
-
recordApertureAdd(element, junction, aperture [, contourIndex] [, junctionIndex] [, apertureIndex]) <static>
-
Records the addition of an aperture to a junction.
Parameters:
Name Type Argument Description elementBIM.Element The element being added to.
junctionBIM.Junction The junction being added to.
apertureBIM.Aperture The aperture that was just added.
contourIndexnumber <optional>
The ordinal index of the element path contour.
junctionIndexnumber <optional>
The ordinal index of the junction in the contour.
apertureIndexnumber <optional>
The ordinal index of the aperture in the junction.
-
recordApertureAdd(element, junction, aperture [, contour_index] [, junction_index] [, aperture_index]) <static>
-
Records the addition of an aperture to a junction.
Parameters:
Name Type Argument Description elementBIM.Element The element being added to.
junctionBIM.Junction The junction being added to.
apertureBIM.Aperture The aperture that was just added.
contour_indexnumber <optional>
The ordinal index of the element path contour.
junction_indexnumber <optional>
The ordinal index of the junction in the contour.
aperture_indexnumber <optional>
The ordinal index of the aperture in the junction.
-
recordApertureChange(element, junction, aperture [, contourIndex] [, junctionIndex] [, apertureIndex]) <static>
-
Records the interactive editing of an aperture size and/or position.
Parameters:
Name Type Argument Description elementBIM.Element The element the aperture belongs to.
junctionBIM.Junction The junction the aperture belongs to.
apertureBIM.Aperture The aperture that was just edited.
contourIndexnumber <optional>
The ordinal index of the element path contour.
junctionIndexnumber <optional>
The ordinal index of the junction in the contour.
apertureIndexnumber <optional>
The ordinal index of the aperture in the junction.
-
recordApertureChange(element, junction, aperture [, contour_index] [, junction_index] [, aperture_index]) <static>
-
Records the interactive editing of an aperture size and/or position.
Parameters:
Name Type Argument Description elementBIM.Element The element the aperture belongs to.
junctionBIM.Junction The junction the aperture belongs to.
apertureBIM.Aperture The aperture that was just edited.
contour_indexnumber <optional>
The ordinal index of the element path contour.
junction_indexnumber <optional>
The ordinal index of the junction in the contour.
aperture_indexnumber <optional>
The ordinal index of the aperture in the junction.
-
recordApertureChangeIfSelectionChanged(element, junction, aperture) <static>
-
Records the manual editing of an aperture size and/or position.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description elementBIM.Element The element the aperture belongs to.
junctionBIM.Junction The junction the aperture belongs to.
apertureBIM.Aperture The aperture that was edited.
-
recordApertureChangeIfSelectionChanged(element, junction, aperture) <static>
-
Records the manual editing of an aperture size and/or position.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description elementBIM.Element The element the aperture belongs to.
junctionBIM.Junction The junction the aperture belongs to.
apertureBIM.Aperture The aperture that was edited.
-
recordApertureRemove(element, junction, aperture [, contourIndex] [, junctionIndex] [, apertureIndex]) <static>
-
Records the removal of an aperture from a junction.
Parameters:
Name Type Argument Description elementBIM.Element The element being deleted from.
junctionBIM.Junction The junction being deleted from.
apertureBIM.Aperture The aperture that is about to be removed.
contourIndexnumber <optional>
The ordinal index of the element path contour.
junctionIndexnumber <optional>
The ordinal index of the junction in the contour.
apertureIndexnumber <optional>
The ordinal index of the aperture in the junction.
-
recordApertureRemove(element, junction, aperture [, contour_index] [, junction_index] [, aperture_index]) <static>
-
Records the removal of an aperture from a junction.
Parameters:
Name Type Argument Description elementBIM.Element The element being deleted from.
junctionBIM.Junction The junction being deleted from.
apertureBIM.Aperture The aperture that is about to be removed.
contour_indexnumber <optional>
The ordinal index of the element path contour.
junction_indexnumber <optional>
The ordinal index of the junction in the contour.
aperture_indexnumber <optional>
The ordinal index of the aperture in the junction.
-
recordApertureSelectionEdit(selection) <static>
-
Records the manual editing of selected apertures.
Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
-
recordApertureSelectionEdit(selection) <static>
-
Records the manual editing of selected apertures.
Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
-
recordApertureSelectionEditIfChanged(selection, id) <static>
-
Records the interactive movement of a selection, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
idnumber The numeric id of the move sequence.
-
recordApertureSelectionEditIfChanged(selection, id) <static>
-
Records the interactive movement of a selection, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
idnumber The numeric id of the move sequence.
-
recordContourAdd(element, contourIndex) <static>
-
Records the addition of a new contour into an element path.
Parameters:
Name Type Description elementBIM.Element The element being added to.
contourIndexnumber The ordinal index of the contour in the element path.
-
recordContourAdd(element, contour_index) <static>
-
Records the addition of a new contour into an element path.
Parameters:
Name Type Description elementBIM.Element The element being added to.
contour_indexnumber The ordinal index of the contour in the element path.
-
recordContourOffset(element, contourIndex) <static>
-
Records the offset of an existing contour in an element path.
Parameters:
Name Type Description elementBIM.Element The element whose path contour is being offset.
contourIndexnumber The ordinal index of the contour in the element path.
-
recordContourRemove(element, contourIndex) <static>
-
Records the removal of an existing contour from an element path.
Parameters:
Name Type Description elementBIM.Element The element being deleted from.
contourIndexnumber The ordinal index of the contour in the element path.
-
recordContourRemove(element, contour_index) <static>
-
Records the removal of an existing contour from an element path.
Parameters:
Name Type Description elementBIM.Element The element being deleted from.
contour_indexnumber The ordinal index of the contour in the element path.
-
recordContourReverse(element, contourIndex) <static>
-
Records the reversal of an existing contour in an element path.
Parameters:
Name Type Description elementBIM.Element The element whose path contour is being reversed.
contourIndexnumber The ordinal index of the contour in the element path.
-
recordContourReverse(element, contour_index) <static>
-
Records the reversal of an existing contour in an element path.
Parameters:
Name Type Description elementBIM.Element The element whose path contour is being reversed.
contour_indexnumber The ordinal index of the contour in the element path.
-
recordControlNodeMoved(element, junction, nodeIndex, id) <static>
-
Records the interactive movement of a control node, updating previous if
idis the same.Parameters:
Name Type Description elementBIM.Element The element the junction belongs to.
junctionBIM.Junction The junction the control node belongs to.
nodeIndexnumber The index of the control node that moved.
idnumber The numeric id of the move sequence.
-
recordControlNodeMoved(element, junction, node_index, id) <static>
-
Records the interactive movement of a control node, updating previous if
idis the same.Parameters:
Name Type Description elementBIM.Element The element the junction belongs to.
junctionBIM.Junction The junction the control node belongs to.
node_indexnumber The index of the control node that moved.
idnumber The numeric id of the move sequence.
-
recordCutElements(selection) <static>
-
Records the removal of a selection set from the model.
Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
-
recordCutElements(selection) <static>
-
Records the removal of a selection set from the model.
Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
-
recordDeleteAnimations(element) <static>
-
Records a deletion of the given element's animations, if it has any.
Parameters:
Name Type Description elementBIM.Element.Three The element whose animations are to be deleted.
-
recordElementAdd(parent, element [, index]) <static>
-
Records the addition of a new element to a level or space.
Parameters:
Name Type Argument Description parentBIM.Level | BIM.Space The level or space being added to.
elementBIM.Element The element that was just added.
indexnumber <optional>
The ordinal index of the new element in its host.
-
recordElementAdd(parent, element [, index]) <static>
-
Records the addition of a new element to a level or space.
Parameters:
Name Type Argument Description parentBIM.Level | BIM.Space The level or space being added to.
elementBIM.Element The element that was just added.
indexnumber <optional>
The ordinal index of the new element in its host.
-
recordElementCreation(element) <static>
-
Records the progressive interactive addition of a new element.
This is different from adding a new element as it records the steps a user is going through as they draw the path of a new element. The element isn't actually added to the model until the user indicates that they are done.
Parameters:
Name Type Description elementBIM.Element The element being created/added to the model.
-
recordElementCreation(element) <static>
-
Records the progressive interactive addition of a new element.
This is different from adding a new element as it records the steps a user is going through as they draw the path of a new element. The element isn't actually added to the model until the user indicates that they are done.
Parameters:
Name Type Description elementBIM.Element The element being created/added to the model.
-
recordElementRemove(parent, element [, index]) <static>
-
Records the removal of an existing element from a level or space.
Parameters:
Name Type Argument Description parentBIM.Level | BIM.Space The level or space being deleted from.
elementBIM.Element The element that is about to be removed.
indexnumber <optional>
The ordinal index of the deleted element in its host.
-
recordElementRemove(parent, element [, index]) <static>
-
Records the removal of an existing element from a level or space.
Parameters:
Name Type Argument Description parentBIM.Level | BIM.Space The level or space being deleted from.
elementBIM.Element The element that is about to be removed.
indexnumber <optional>
The ordinal index of the deleted element in its host.
-
recordGlobalLocationChange(new_latitude, new_longitude [, new_timezone]) <static>
-
Sets the global location after recording its current values and creating/updating an undo record.
NOTE: In order to efficiently record the change in value, you must use this method to actually set the new location. If you change the global location value before calling this method, its current values will be the same as the new values, so there will effectively be no change to record.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a global location change within the current
time limit, then that entry will be updated with the new location instead of creating and adding a new entry.Parameters:
Name Type Argument Description new_latitudenumber The new latitude angle in degrees (-90 to 90).
new_longitudenumber The new longitude angle in degrees (-180 to 180).
new_timezonenumber <optional>
The new timezone in decimal hours (-12 to +13), will be computed if not given.
-
recordGlobalStateChange(property, oldValue, newValue) <static>
-
Records a change in the value of the given
PD.GlobalStateproperty.This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a global state change of the same property within the current
time limit, then that entry will be updated with the new value instead of creating and adding a new entry.Parameters:
Name Type Description propertystring The
PD.GlobalStateproperty that changed.oldValueany The previous value before the change.
newValueany The current value after the change.
-
recordJunctionAdd(element, junction [, contourIndex] [, junctionIndex]) <static>
-
Records the addition of a new junction to an element path.
Parameters:
Name Type Argument Description elementBIM.Element The element being added to.
junctionBIM.Junction The junction that was just added.
contourIndexnumber <optional>
The ordinal index of the element path contour.
junctionIndexnumber <optional>
The ordinal index of the junction in the contour.
-
recordJunctionAdd(element, junction [, contour_index] [, junction_index]) <static>
-
Records the addition of a new junction to an element path.
Parameters:
Name Type Argument Description elementBIM.Element The element being added to.
junctionBIM.Junction The junction that was just added.
contour_indexnumber <optional>
The ordinal index of the element path contour.
junction_indexnumber <optional>
The ordinal index of the junction in the contour.
-
recordJunctionFlagsChange(selection, id) <static>
-
Stores junction flag value changes in the selection set.
__NOTE: __ This action is slightly different from other undo actions in that, to work, it requires you to call it at least twice with the same selection
idnumber. The first call should occur before changes are made and creates the undo action with each junction's old flag values. The second call should occur after changes are made to store each junction's new flag values.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
idnumber The numeric id of the selection.
-
recordJunctionFlagsChange(selection, id) <static>
-
Stores junction flag value changes in the selection set.
__NOTE: __ This action is slightly different from other undo actions in that, to work, it requires you to call it at least twice with the same selection
idnumber. The first call should occur before changes are made and creates the undo action with each junction's old flag values. The second call should occur after changes are made to store each junction's new flag values.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
idnumber The numeric id of the selection.
-
recordJunctionRemove(element, junction [, contourIndex] [, junctionIndex]) <static>
-
Records the removal of an existing junction from an element path.
Parameters:
Name Type Argument Description elementBIM.Element The element being deleted from.
junctionBIM.Junction The junction that is about to be deleted.
contourIndexnumber <optional>
The ordinal index of the element path contour.
junctionIndexnumber <optional>
The ordinal index of the junction in the contour.
-
recordJunctionRemove(element, junction [, contour_index] [, junction_index]) <static>
-
Records the removal of an existing junction from an element path.
Parameters:
Name Type Argument Description elementBIM.Element The element being deleted from.
junctionBIM.Junction The junction that is about to be deleted.
contour_indexnumber <optional>
The ordinal index of the element path contour.
junction_indexnumber <optional>
The ordinal index of the junction in the contour.
-
recordLevelAdd(structure, level [, index]) <static>
-
Records the addition of a new level to a structure.
Parameters:
Name Type Argument Description structureBIM.Structure The structure being added to.
levelBIM.Level The level that was just added.
indexnumber <optional>
The ordinal index of the added level in the structure.
-
recordLevelAdd(structure, level [, index]) <static>
-
Records the addition of a new level to a structure.
Parameters:
Name Type Argument Description structureBIM.Element The structure being added to.
levelBIM.Level The level that was just added.
indexnumber <optional>
The ordinal index of the added level in the structure.
-
recordLevelHeights(structure) <static>
-
Records the order and heights of each level in the given structure.
Parameters:
Name Type Description structureBIM.Structure The structure to record level data for.
-
recordLevelHeights(structure) <static>
-
Records the order and heights of each level in the given structure.
Parameters:
Name Type Description structureBIM.Structure The structure to record level data for.
-
recordLevelRemove(structure, level [, index]) <static>
-
Records the removal of a level from a structure.
Parameters:
Name Type Argument Description structureBIM.Structure The structure being removed from.
levelBIM.Level The level that is about to be removed.
indexnumber <optional>
The ordinal index of the level in the structure.
-
recordLevelRemove(structure, level [, index]) <static>
-
Records the removal of a level from a structure.
Parameters:
Name Type Argument Description structureBIM.Element The structure being removed from.
levelBIM.Level The level that is about to be removed.
indexnumber <optional>
The ordinal index of the level in the structure.
-
recordMergeToCompositeElement(parent, children, level) <static>
-
Records the merging of child roof elements into a parent composite roof element.
Parameters:
Name Type Description parentBIM.Roof.Composite The parent composite roof.
childrenArray.<BIM.Roof> The list of child roofs merged into the parent.
levelBIM.Level The level the children came from.
-
recordMergeToCompositeElement(parent, children, level) <static>
-
Records the merging of child roof elements into a parent composite roof element.
Parameters:
Name Type Description parentBIM.Roof.Composite The parent composite roof.
childrenArray.<BIM.Roof> The list of child roofs merged into the parent.
levelBIM.Level The level the children came from.
-
recordNewProject(oldProject, newProject) <static>
-
Records the creation of a new model project.
Parameters:
Name Type Description oldProjectBIM.Project The old project.
newProjectBIM.Project The new project.
-
recordNewProject(old_project, new_project) <static>
-
Records the creation of a new model project.
Parameters:
Name Type Description old_projectBIM.Project The old project.
new_projectBIM.Project The new project.
-
recordParameterChange(host, param, group, oldValue, newValue) <static>
-
Records changes to a dynamic parameter of a host object.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a change of the same parameter on the same host, within the current
time limit, then that entry will be updated with the new value instead of creating and adding a new entry.NOTE: Dynamic parameters do not have a 'setAndRecord' method as undo/redo is handled internally by the parameters themselves. You must therefore use the
PD.Parameter#setValueOnHostorPD.Parameter#setValueOnHostIfDifferentmethods on the parameter itself.Parameters:
Name Type Description hostobject The element/object that hosts the dynamic parameter group.
paramPD.Parameter The dynamic parameter that changed.
groupPD.ParamGroup The parameter group that this dynamic parameter belongs to.
oldValueany The previous value before the change.
newValueany The current value after the change.
-
recordPasteParameters(element, component, new_params) <static>
-
Records multiple parameter changes, typically due to copy/pasting parameter data.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a change of the same parameters on the same element and component, within the current
time limit, then that entry will be updated with the new parameter values instead of creating and adding a new entry.Parameters:
Name Type Description elementBIM.Element The element that hosts the component or parameters.
componentBIM.Component The component that hosts the parameters, if any.
new_paramsobject Typically a JSON data object.
-
recordPathColorChange(element, oldColor) <static>
-
Records changes to the path fill color value of an element.
Parameters:
Name Type Description elementBIM.Element The element whose path color changed.
oldColorany The previous color value before the change.
-
recordPathColorChange(element, old_color) <static>
-
Records changes to the path fill color value of an element.
Parameters:
Name Type Description elementBIM.Element The element whose path color changed.
old_colorany The previous color value before the change.
-
recordPathFlagsChange(path, oldFlags) <static>
-
Records the current flags in an element path.
Parameters:
Name Type Description pathBIM.Path The path to record the current flags of.
oldFlagsnumber The previous flags value.
-
recordPathMove(element [, all]) <static>
-
Records the interactive movement of point(s) within an element path.
Parameters:
Name Type Argument Description elementBIM.Element The element whose path point(s) moved.
allboolean <optional>
Whether or not the whole path was moved.
-
recordPathMove(element [, all]) <static>
-
Records the interactive movement of point(s) within an element path.
Parameters:
Name Type Argument Description elementBIM.Element The element whose path point(s) moved.
allboolean <optional>
Whether or not the whole path was moved.
-
recordPathMoveIfSelectionChanged(element [, all]) <static>
-
Records the manual movement of point(s) within an element path, only if selection changed.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Argument Description elementBIM.Element The element whose path moved.
allboolean <optional>
Whether or not the whole path was moved.
-
recordPathMoveIfSelectionChanged(element [, all]) <static>
-
Records the manual movement of point(s) within an element path, only if selection changed.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Argument Description elementBIM.Element The element whose path moved.
allboolean <optional>
Whether or not the whole path was moved.
-
recordPathState(path [, actionName]) <static>
-
Records the current state of an element path.
Parameters:
Name Type Argument Description pathBIM.Path The path to record the current state of.
actionNamestring <optional>
The an optional name for the undo record, defaults to 'Modify Path'.
-
recordProjectDataAddItem(map, item, type) <static>
-
Records the addition of a new shared project data item.
Parameters:
Name Type Description mapMap The map the data item was added to.
itemobject The item that was added.
typestring The type of data item.
-
recordProjectDataAddItem(map, item, type) <static>
-
Records the addition of a new shared project data item.
Parameters:
Name Type Description mapMap The map the data item was added to.
itemobject The item that was added.
typestring The type of data item.
-
recordProjectDataDeleteItem(map, item, type) <static>
-
Records the deletion of a new shared project data item.
Parameters:
Name Type Description mapMap The map the data item was deleted from.
itemobject The item that was deleted.
typestring The type of data item.
-
recordProjectDataDeleteItem(map, item, type) <static>
-
Records the deletion of a new shared project data item.
Parameters:
Name Type Description mapMap The map the data item was deleted from.
itemobject The item that was deleted.
typestring The type of data item.
-
recordPropertyChange(host, property, oldValue, newValue [, callback]) <static>
-
Records a change to the given property of a host object.
This method can be called multiple times during an ongoing operation. If the last entry in the undo queue is of the same type and for the same host and property, within the current
time limit, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, for a different host or property, or occurred prior to the time limit, a new undo entry of this type will be added.Parameters:
Name Type Argument Description hostobject The element/object with the property.
propertystring The name of the property that changed.
oldValueany The previous value before the change.
newValueany The current value after the change.
callbackfunction | string <optional>
An optional callback function or method name to invoke on each change.
-
recordRectMeshEditIfSelectionChanged(mesh, originalExtents) <static>
-
Records the manual editing of a rectangular mesh, only if selection changed.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, modified the same mesh and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description meshPD.RectMesh The rectangular mesh being edited.
originalExtentsTHREE.Box3 The original bounding box extents before edit.
-
recordRectMeshEditIfSelectionChanged(mesh, original_extents) <static>
-
Records the manual editing of a rectangular mesh, only if selection changed.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, modified the same mesh and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description meshPD.RectMesh The rectangular mesh being edited.
original_extentsTHREE.Box3 The original bounding box extents before edit.
-
recordSelectionMove(selection, vector) <static>
-
Records the manual movement of a selection set.
Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
vectorTHREE.Vector3 The vector to move the selection by.
-
recordSelectionMove(selection, vector) <static>
-
Records the manual movement of a selection set.
Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
vectorTHREE.Vector3 The vector to move the selection by.
-
recordSelectionMoveIfChanged(selection, vector, id) <static>
-
Records the interactive movement of a selection set, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
vectorTHREE.Vector3 The relative vector to move the selection by.
idnumber The numeric id of the move sequence.
-
recordSelectionMoveIfChanged(selection, vector, id) <static>
-
Records the interactive movement of a selection set, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
vectorTHREE.Vector3 The relative vector to move the selection by.
idnumber The numeric id of the move sequence.
-
recordSelectionRotateIfChanged(selection, quaternion, refPoint, id) <static>
-
Records the interactive rotation of a selection set, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
quaternionTHREE.Quaternion The rotation quaternion.
refPointTHREE.Vector3 The rotation about point.
idnumber The numerical id of the sequence.
-
recordSelectionRotateIfChanged(selection, quaternion, refPoint, id) <static>
-
Records the interactive rotation of a selection set, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
quaternionTHREE.Quaternion The rotation quaternion.
refPointTHREE.Vector3 The rotation about point.
idnumber The numerical id of the sequence.
-
recordSelectionTransformIfChanged(selection, matrix, refPoint, id) <static>
-
Records the interactive transformation of a selection set, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
matrixTHREE.Matrix4 The transformation matrix.
refPointTHREE.Vector3 The rotation about point.
idnumber The numerical id of the sequence.
-
recordSelectionTransformIfChanged(selection, matrix, refPoint, id) <static>
-
Records the interactive transformation of a selection set, updating previous if
idis the same.This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description selectionPD.SelectionSet The extended selection set, if any.
matrixTHREE.Matrix4 The transformation matrix.
refPointTHREE.Vector3 The rotation about point.
idnumber The numerical id of the sequence.
-
recordSeparateCompositeElement(parent, level) <static>
-
Records the separation of child roof elements from a parent composite roof element.
Parameters:
Name Type Description parentBIM.Roof.Composite The parent composite roof.
levelBIM.Level The level the children came from.
-
recordSeparateCompositeElement(parent, level) <static>
-
Records the separation of child roof elements from a parent composite roof element.
Parameters:
Name Type Description parentBIM.Roof.Composite The parent composite roof.
levelBIM.Level The level the children came from.
-
recordStructureRemove(project, structure [, index]) <static>
-
Records the removal of a structure from a project.
Parameters:
Name Type Argument Description projectBIM.Project The project the structure belongs to.
structureBIM.Structure The structure being removed from.
indexnumber <optional>
The ordinal index of the level in the structure.
-
recordTransformOriginChange(origin, id) <static>
-
Stores changes to the position of the transform origin.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description originPD.Point The transform origin to store.
idnumber The numeric id of the selection.
-
recordTransformOriginChange(origin, id) <static>
-
Stores changes to the position of the transform origin.
This method can be called multiple times during an ongoing operation. If the last item in the undo queue is of the same type, the selection set identifier has not changed and it is within 4sec of the last undo action, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, has a different
idvalue or occurred more than 4sec ago, a new undo entry of this type will be added.Parameters:
Name Type Description originPD.Point The transform origin to store.
idnumber The numeric id of the selection.
-
recordTypeComponentChange(element, new_type) <static>
-
Records an element type component change.
Parameters:
Name Type Description elementBIM.Element The element who's type changed.
new_typeBIM.Component The new type being changed to.
-
recordTypeComponentChange(element, new_type) <static>
-
Records an element type component change.
Parameters:
Name Type Description elementBIM.Element The element who's type changed.
new_typeBIM.Component The new type being changed to.
-
recordViewAdd(project, view) <static>
-
Records the adding of a new stored view to the project.
Parameters:
Name Type Description projectBIM.Project The project the view was added to.
viewBIM.DrawingView The view that was just added.
-
recordViewAdd(project, view) <static>
-
Records the adding of a new stored view to the project.
Parameters:
Name Type Description projectBIM.Project The project the view was added to.
viewBIM.DrawingView The view that was just added.
-
recordViewData(view) <static>
-
Records a stored view name and type prior to it being edited/changed.
Parameters:
Name Type Description viewBIM.DrawingView The view that is about to be edited.
-
recordViewData(view) <static>
-
Records a stored view name and type prior to it being edited/changed.
Parameters:
Name Type Description viewBIM.DrawingView The view that is about to be edited.
-
recordViewUpdate(view) <static>
-
Records a stored view update record prior to it being updated.
Parameters:
Name Type Description viewBIM.DrawingView The view that is about to be updated.
-
recordViewUpdate(view) <static>
-
Records a stored view update record prior to it being updated.
Parameters:
Name Type Description viewBIM.DrawingView The view that is about to be updated.
-
recordViewsList(project) <static>
-
Records a new stored view list record.
Parameters:
Name Type Description projectBIM.Project The project whose view list is recorded.
-
recordViewsList(project) <static>
-
Records a new stored view list record.
Parameters:
Name Type Description projectBIM.Project The project whose view list is recorded.
-
redo() <static>
-
Redoes the last undo action, if available.
-
setAndRecordGlobalLocationChange(new_latitude, new_longitude [, new_timezone]) <static>
-
Sets the global location after recording its current values and creating/updating an undo record.
NOTE: In order to efficiently record the change in value, you must use this method to actually set the new location. If you change the global location value before calling this method, its current values will be the same as the new values, so there will effectively be no change to record.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a global location change within the current
time limit, then that entry will be updated with the new location instead of creating and adding a new entry.Parameters:
Name Type Argument Description new_latitudenumber The new latitude angle in degrees (-90 to 90).
new_longitudenumber The new longitude angle in degrees (-180 to 180).
new_timezonenumber <optional>
The new timezone in decimal hours (-12 to +13), will be computed if not given.
-
setAndRecordPropertyChange(host, property, newValue [, callback]) <static>
-
Sets the value of the given property on a host object after recording its current value and creating/updating an undo record.
Use this method instead of
PD.GlobalUndo.recordPropertyChangeif you do not want to manage the recording of the existing value before setting the new value and recording the change.NOTE: In order to efficiently record the change in value, you must use this method to actually set the new value. If you change the host property value before calling this method, its current value will be the same as the new value, so there will effectively be no value change to record.
This method can be called multiple times during an ongoing operation. If the last entry in the undo queue is of the same type and for the same host and property, within the current
time limit, then the last undo action itself will be updated to reflect the new changes. If the last undo action is of a different type, for a different host or property, or occurred prior to the time limit, a new undo entry of this type will be added.Parameters:
Name Type Argument Description hostobject The element/object with the property.
propertystring The name of the property that changed.
newValueany The current value after the change.
callbackfunction | string <optional>
An optional callback function or method name to invoke on each change.
-
setDateTime(day, time) <static>
-
Sets the global date/time and creates and undo/redo record.
NOTE: In order to efficiently record the change in value, you must rely on this method to actually set the new date/time. If you change the global date and/or time before calling this method, their current values will be the same as the new values, so there will effectively be no change to record.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a global date/time change within the current
time limit, then that entry will be updated with the new date/time instead of creating and adding a new entry.You can alternatively us the
PD.GlobalActions.setDateTimemethod to set the date/time without adding an undo/redo entry.Parameters:
Name Type Description daynumber The ordinal day of the year (0 to 365).
timenumber The time of day in decimal hours (0 to 24).
Returns:
Returns true if the date or time changed, otherwise false.
- Type
- boolean
-
setDayOfYear(day) <static>
-
Sets the current day of the year.
This method first checks if the new day of the year is at least 1 day from the current day of the year before applying the change. Any less than this is no meaningful difference in the time of day.
You can alternatively use the
PD.GlobalActions.setDayOfYearmethod to set the day without adding an undo/redo entry.Parameters:
Name Type Description daynumber The ordinal day of the year (0 to 365).
Returns:
Returns true if the day changed, otherwise false.
- Type
- boolean
-
setLatitude(latitude) <static>
-
Sets the location latitude angle and creates an undo/redo entry.
This method first checks if the new latitude is at least 1e-6 degrees from the current latitude before applying the change. This represents a threshold distance of around 100mm (4") on the Earth's surface, below which there is no meaningful difference in location.
You can alternatively use the
PD.GlobalActions.setLatitudemethod to set the location without adding an undo/redo entry.Parameters:
Name Type Description latitudenumber The new geographic latitude above the equator, in decimal degrees (-90 to 90).
Returns:
Returns true if the location changed, otherwise false.
- Type
- boolean
-
setLocation(latitude, longitude [, timezone]) <static>
-
Sets the global site location and creates and undo/redo record.
NOTE: In order to efficiently record the change in value, you must rely on this method to actually set the new location. If you change the global location value before calling this method, its current values will be the same as the new values, so there will effectively be no change to record.
This method can be called multiple times during an interactive action. If the previous entry in the undo queue is a global location change within the current
time limit, then that entry will be updated with the new location instead of creating and adding a new entry.You can alternatively us the
PD.GlobalActions.setLocationmethod to set the location without adding an undo/redo entry.Parameters:
Name Type Argument Description latitudenumber The new geographic latitude above the equator, in decimal degrees (-90 to 90).
longitudenumber The new geographic longitude west of the prime meridian, in decimal degrees (-180 to 180).
timezonenumber <optional>
The new timezone in decimal hours (-12 to +13), will be computed if not given.
Returns:
Returns true if the location changed, otherwise false.
- Type
- boolean
-
setLongitude(longitude) <static>
-
Sets the location longitude angle and creates an undo/redo entry.
This method first checks if the new longitude is at least 1e-6 degrees from the current longitude before applying the change. This represents a threshold distance of around 100mm (4") on the Earth's surface, below which there is no meaningful difference in location.
You can alternatively use the
PD.GlobalActions.setLongitudemethod to set the location without adding an undo/redo entry.Parameters:
Name Type Description longitudenumber The new geographic longitude west of the prime meridian, in decimal degrees (-180 to 180).
Returns:
Returns true if the location changed, otherwise false.
- Type
- boolean
-
setTimeOfDay(time) <static>
-
Sets the current hour of the day and creates an undo/redo entry.
This method first checks if the new time is at least 1 second from the current time before applying the change. Any less than this is no meaningful difference in the time of day.
You can alternatively use the
PD.GlobalActions.setTimeOfDaymethod to set the time without adding an undo/redo entry.Parameters:
Name Type Description timenumber The time of day in decimal hours (0 to 24).
Returns:
Returns true if the time of day changed, otherwise false.
- Type
- boolean
-
setTimeZone(timezone) <static>
-
Sets the location timezone offset and creates an undo/redo entry.
This method first checks if the new timezone is at least 1 minute from the current timezone before applying the change. Any less than this is no meaningful difference in location.
You can alternatively use the
PD.GlobalActions.setTimeZonemethod to set the location without adding an undo/redo entry.Parameters:
Name Type Description timezonenumber The new timezone in decimal hours (-12 to +13).
Returns:
Returns true if the location changed, otherwise false.
- Type
- boolean
-
shallowDiff(refObj, newObj) <static>
-
Compares two objects and returns the differences, or null if the same.
This method considers the reference object to be the source of truth, so only check the properties that it contains. This means that the new object can contain any number of other properties and/or methods which will not be checked.
If there are changes, the returned data object will contain the keys for each changed property with the stored value being an {_OLD,_NEW} object.
Parameters:
Name Type Description refObjobject The reference object with the original data.
newObjobject The new object with updated or changed data.
Returns:
Returns an object with changed fields, or null if no changes.
- Type
- object | null
-
undo() <static>
-
Undoes the last action, if available.
-
updateGlobalState() <static>
-
Updates the
canUndoandcanRedoproperties in global state.It also updates the undo and redo lists to support the UI displaying the actual undo/redo stack.
This allows a front-end framework to update the state of undo/redo buttons or menu items within the UI as state changes occur.
-
updateModel() <static>
-
A placeholder that the host application can reassign or override in order to update its internal model when an entity's parameters are changed.
Call this method after your undo/redo action makes any significant changes that affect the host application's internal model.
-
updateSelectionAndView() <static>
-
Updates the current selection set and generates a redraw.
Call this method if your undo/redo action affects only what is selected and does not change any geometry within the model.
-
updateSelectionAndView() <static>
-
Updates the current selection set and generates a redraw.
Call this method if your undo/redo action affects only what is selected and does not change any geometry within the model.