property Chart.UndoListAction ([Action as Variant], [Count as Variant]) as String
Lists the Undo actions that can be performed in the chart.

TypeDescription
Action as Variant [optional] A long expression that specifies the action being listed. If missing or -1, all actions are listed. 

The Action parameter can be one of the following:

  • exChartUndoRedoAddBar(0) ~ "AddBar;ITEMINDEX;KEY", indicates that a new bar has been created
  • exChartUndoRedoRemoveBar(1) ~ "RemoveBar;ITEMINDEX;KEY", indicates that a bar has been removed
  • exChartUndoRedoMoveBar(2) ~ "MoveBar;ITEMINDEX;KEY", indicates that a bar has been moved or resized
  • exChartUndoRedoPercentChange(3) ~ "PercentChange;ITEMINDEX;KEY", indicates that the bar's percent has been changed
  • exChartUndoRedoUpdateBar(4) ~ "UpdateBar;ITEMINDEX;KEY", indicates that one or more properties of the bar has been updated (ItemBar property, this operation can be added only using the StartUpdateBar / EndUpdateBar methods)
  • exChartUndoRedoParentChangeBar(5) ~ "ParentChangeBar;ITEMINDEX;KEY", indicates that the bar's parent has been changed
  • exChartUndoRedoGroupBars(6) ~ "GroupBars;ITEMINDEXA;KEYA;STARTA;ITEMINDEXB;KEYB;STARTB", specifies that two bars has been grouped
  • exChartUndoRedoUngroupBars(7) ~ "UngroupBars;ITEMINDEXA;KEYA;STARTA;ITEMINDEXB;KEYB;STARTB", specifies that two bars has been ungrouped
  • exChartUndoRedoDefineSummaryBars(8) ~ "DefineSummaryBars;SUMMARYITEMINDEX;SUMMARYKEY;ITEMINDEX;KEY", indicates that a bar has been defined as a child of a summary bar
  • exChartUndoRedoUndefineSummaryBars(9) ~ "UndefineSummaryBars;SUMMARYITEMINDEX;SUMMARYKEY;ITEMINDEX;KEY", indicates that a bar has been removed from the summary bar's children
  • exChartUndoRedoAddLink(10) ~ "AddLink;KEY", indicates that a new link has been created
  • exChartUndoRedoRemoveLink(11) ~ "RemoveLink;KEY", indicates that a link has been removed
  • exChartUndoRedoUpdateLink(12) ~ "UpdateLink;KEY", specifies that one of more properties of the link has been updated (Link property, this operation can be added only using the StartUpdateLink / EndUpdateLink methods)
  • exListUndoRedoAddItem(13) ~ "AddItem;ITEMINDEX", indicates that a new item has been created
  • exListUndoRedoRemoveItem(14) ~ "RemoveItem;ITEMINDEX", indicates that an item has been removed
  • exListUndoRedoChangeItemPos(15) ~ "ChangeItemPos;ITEMINDEX", indicates that an item changes its position or / and parent
  • exListUndoRedoChangeCellValue(16) ~ "ChangeCellValue;ITEMINDEX;CELLINDEX", indicates that the cell's value has been changed
  • exListUndoRedoChangeCellState(17) ~ "ChangeCellState;ITEMINDEX;CELLINDEX", indicates that the cell's state has been changed

For instance, UndoListAction(0) shows only AddBar actions in the undo stack.

Count as Variant [optional] A long expression that indicates the number of actions being listed. If missing or -1, all actions are listed. For instance, UndoListAction(0,1) shows only the last AddBar action being added to the undo stack
String A String expression that lists the Undo actions that may be performed.
Use the UndoListAction property to show the list of actions that the user may perform by doing Undo operations. The ChartStartChanging(exUndo/exRedo) / ChartEndChanging(exUndo/exRedo) event notifies your application whenever an Undo/Redo operation is performed. For instance, the ChartEndChanging(exUndoRedoUpdate) notifies whether a new operation is added/removed from the undo/redo queue.  Use the UndoRemoveAction method to remove the last actions from the undo queue. The RedoListAction property lists the Redo actions that can be performed in the chart. The CanUndo property specifies whether an undo operation can be performed if CTRL+Z key is pressed.

The records of the Undo/Redo queue may contain actions in the following format:

The records of the Undo/Redo queue may contain actions in the following format (available starting from 23.0):

Also, the Undo/Redo queue may include:

Each action is on a single line, and each field is separated by ; character.  The lines are separated by "\r\n" characters ( vbCrLf in VB ). 

For instance, 

Here's a sample format of the UndoListAction property may get:

StartBlock
	MoveBar;1;E
	MoveBar;2;E
	MoveBar;3;
	MoveBar;4;
EndBlock
MoveBar;1;
DefineSummaryBars;4;;1;E
AddBar;1;E
DefineSummaryBars;4;;2;E
AddBar;2;E
DefineSummaryBars;4;;3;
AddBar;3;
AddBar;4;
DefineSummaryBars;1;;4;E
GroupBars;3;E;0;4;E;-1
GroupBars;3;E;0;4;E;-1
AddLink;L2
AddBar;4;E
GroupBars;2;;0;3;E;-1
GroupBars;2;;0;3;E;-1
AddLink;L1
DefineSummaryBars;1;;3;E
AddBar;3;E
DefineSummaryBars;1;;2;
AddBar;2;
AddBar;1;

The following VB sample splits the UndoListAction value and adds each action to a listbox control:

List1.Clear
Dim s() As String
s = Split(G2antt1.Chart.UndoListAction, vbCrLf)
For i = LBound(s) To UBound(s)
            List1.AddItem s(i)
Next