Hi Stoyo,
In certain circumstances, I am calling
chart.DestroyGroup(group);
and getting a 'not in Collection' exception, despite the fact that it is in the chart.Groups collection (as shown by the contains() method, I have even nested the DestroyGroup comand in a 'if contains' clause, which passes, then the DestroyGroup fails)
In my 'immedeate' window in debug I can call the
chart.DestroyGroup(group);
succesfully, however in the code it fails.
The actual exception is
Cannot remove the specified item because it was not found in the specified Collection.
Stack
at System.Collections.CollectionBase.System.Collections.IList.Remove(Object value)
at MindFusion.Diagramming.WinForms.ArrowCollection.Remove(Arrow arrow)
at MindFusion.Diagramming.WinForms.FlowChart.xcb9d24c05271f0d0(ChartObject xccb63ca5f63dc470)
at MindFusion.Diagramming.WinForms.FlowChart.x2237804176f4caea(ChartObject xccb63ca5f63dc470)
at MindFusion.Diagramming.WinForms.Commands.RemoveItemCmd.Execute(Boolean undoEnabled)
at MindFusion.Diagramming.WinForms.UndoManager.xdf8cd2685f83d9b7(Command x61b060a94340c4fc)
at MindFusion.Diagramming.WinForms.Commands.RemoveItemCmd.Execute()
at MindFusion.Diagramming.WinForms.FlowChart.x7d877b7264517b49(ChartObject xccb63ca5f63dc470)
at MindFusion.Diagramming.WinForms.Node.x1e79a23123e06c84()
at MindFusion.Diagramming.WinForms.FlowChart.x2237804176f4caea(ChartObject xccb63ca5f63dc470)
at MindFusion.Diagramming.WinForms.Commands.RemoveItemCmd.Execute(Boolean undoEnabled)
at MindFusion.Diagramming.WinForms.UndoManager.xdf8cd2685f83d9b7(Command x61b060a94340c4fc)
at MindFusion.Diagramming.WinForms.Commands.RemoveItemCmd.Execute()
at MindFusion.Diagramming.WinForms.FlowChart.x7d877b7264517b49(ChartObject xccb63ca5f63dc470)
at MindFusion.Diagramming.WinForms.Group.x1728a8b42c4b1ae1(Boolean xcf407f8ccb2b3916)
at MindFusion.Diagramming.WinForms.Commands.RemoveGroupCmd.Execute(Boolean undoEnabled)
at MindFusion.Diagramming.WinForms.UndoManager.xdf8cd2685f83d9b7(Command x61b060a94340c4fc)
at MindFusion.Diagramming.WinForms.Commands.RemoveGroupCmd.Execute()
at MindFusion.Diagramming.WinForms.FlowChart.DestroyGroup(Group group)
at Pelion.PM3.SolutionBuilder.Builders.Groups.SolutionGroups.DestroyGroup(GroupType groupType, Hashtable ImageBoxes) in C:\PEPS\R_01_5_5\PM3
Very strange, very frustrating.
Any ideas?