This project has moved and is read-only. For the latest updates, please go here.

ArgumentOutOfRange exception when using GridLayouter

Sep 30, 2014 at 7:30 AM
Edited Sep 30, 2014 at 7:32 AM
When using GridLayouter with empty diagram, the ArgumentOutOfRangeException is thrown:
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Dataweb.NShape.Layouters.LayouterBase.CalcLayoutArea()
at Dataweb.NShape.Layouters.GridLayouter.ExecuteStepCore()
at Dataweb.NShape.Layouters.LayouterBase.ExecuteStep()
at Dataweb.NShape.Layouters.LayouterBase.Execute(Int32 maxSeconds)
The code to reproduce the issue:
this.Project.Name = "Test project";

// Initialize project with a shape library
this.Project.AddLibrary(Assembly.GetExecutingAssembly(), false);

this.Diagram = new Diagram("Test");


RepulsionLayouter repulsionLayouter = new RepulsionLayouter(this.Project);

GridLayouter gridLayouter = new GridLayouter(this.Project);
Sep 30, 2014 at 9:05 AM
Thanks for the feedback. I can reproduce the issue and we will fix it.