We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Index out of range for Diagram.Layout

Hello,

When I tried:

var lo = new LayoutOptions { Direction = LayoutDirection.TopToBottom};
lo.LayoutStyle = LayoutStyle.FlowChart;
diagram.Layout(lo);

… it results in an error, "Index was out of range. Must be non-negative and less than the size of the collection."

Stack trace:
at System.Collections.ArrayList.get_Item(Int32 index)
at Aspose.Diagram.ShapeCollection.get_Item(Int32 index)
at . ()
at . ()
at . (Page )
at Aspose.Diagram.Page.Layout(LayoutOptions options)
at Aspose.Diagram.Diagram.Layout(<span style=“font-family: “Courier New”; font-size: small;”>LayoutOptions options)
<span style=“font-family: “Courier New”; font-size: small;”>at MyUnitTest…

Hope this helps.

Hi,


Thank you for contacting support. Please also provide us your source drawing and the complete code (Aspose.Diagram API part) to replicate the error on our side. We shall investigate and reply you appropriately. Your response is awaited.