Auto-Layout on only one layer

I’m trying to do a GoLayoutLayeredDigraph on only one layer or a selection from just one layer and get the same columnar output as I would get for the complete document.
What happens is that I only get all nodes in one column. Is there an end run like getting the one layer into it’s own document and then back into the original document.
My graph has basicly stand-alone layers of directed graphs. I want each layer to be layed out in multiple columns and in the upper left individually and all at once depending on the user’s choice.

goView1.StartTransaction();
GoLayoutLayeredDigraph layout = new GoLayoutLayeredDigraph();
layout.Document = goView1.Document;
layout.Network = new GoLayoutNetwork();
layout.Network.AddNodesAndLinksFromCollection(… some layer or some other collection of nodes and links …, true);
layout.DirectionOption = GoLayoutDirection.Down;
// set any other options …
layout.PerformLayout();
goView1.FinishTransaction(“layout”);
The critical point is that you need to specify the GoLayoutNetwork to be used, rather than having it default to one constructed from the whole GoDocument.

That gives me long row, but I have branches or multiple rows that need to be fanned out.

I don’t understand what you are saying. Do you mean that after the layout of two or more layers, a lot of the nodes will be overlapping?
If so, then after each layout, you need to call GoDocument.ComputeBounds on the collection you just laid out, and then move the collection appropriately, depending on how you want to arrange the separate graphs.
IGoCollection coll = … some layer or some other collection of nodes and links …
goView1.StartTransaction();
GoLayoutLayeredDigraph layout = new GoLayoutLayeredDigraph();
layout.Document = goView1.Document;
layout.Network = new GoLayoutNetwork();
layout.Network.AddNodesAndLinksFromCollection(coll, true);
layout.DirectionOption = GoLayoutDirection.Down;
// set any other options …
layout.PerformLayout();
RectangleF r = GoDocument.ComputeBounds(coll, goView1);
SizeF offset = … compute how much to shift the collection to get it to be where you want it …
GoSelection sel = new GoSelection(null);
sel.AddRange(coll);
goView1.MoveSelection(sel, offset, true);
goView1.FinishTransaction(“layout”);

I have a GoDoc with multiple layers similar to figure 12 of the GoLayout User Guide on page 15. Need to run auto-layout on a single layer or selection and format the nodes in a multi-level manor, not a straigt line horizontally or vertically. The auto-layout output should look like figure 12 which is what I get when I auto-layout the entire diagram if all the layers were visible in one view, which they are not.

I’ll try experimenting with your code, but it would seem like I could get the same affect for one layer that I can from the entire diagram. When I auto-layout the entire diagram, I select all nodes a layer at a time and reposition them into the upper left of each grid/doc coordinate. Each layer is independent but links can cross over and link nodes from different layers. Like an electrical schematic.<span style=“font-size: 11pt; font-family: “Times New Roman”;”>