Layout the diagram containing directed edges and nodes, according to directions of edges in the diagram

Hi,
The layouts available arranges the nodes considering the ‘from’ and ‘to’ nodes of the edges not as per the direction of the arrow on the edge. I want to layout the diagram considering the arrow direction not considering the from node and to node of the link.
My diagram contains nodes having edge with arrow at from side, sometimes at to side(and not at both from and to side). The diagram with above kinds of edges gives strange layout if from and to nodes of the edge are not changed as per edge direction. Is there any simple way to layout the diagram considering the direction of the edges?
Thanks in advance.

You can set up the GoLayout(type)Network, then go in and change the from/to of the links. See DataSetDemo AutoLayout method for similar editing of a GoLayoutTreeNetwork. FamilyTree may also help.

Dear Jake,
Thank you very much for the reply.
Here, if i understand it correctly, you mean, I need to write an AutoLayout method, similar to the method in the demo you mentioned. In the method, every link is checked if it has correct ‘from node’ and ‘to node’(i.e. if link has arrow at from side then link’s from node and to nodes should be replaced so that arrow always remains at toNode side). If it does not then it should be changed. If there are more links then wont it be slow.? In my application, I am frequently changing directions i.e. arrow locations on the link depending on some other results(which is done through code not manually). And I initially set the from and to nodes of the links in my diagram as per some other layout I wanted at first. But now I also want the layout of the same diagram as per arrow direction/location of arrow(at to node or from node).
It is the only solution(that is to change the from and to nodes of the link as per changed arrow location/direction) possible to get layout as per direction of the arrow(location of arrow on the link)?
Thank you very much.

When you use our Autolayout… it actually makes a copy of the “network” in your nodes and links into a convenient form for the layout code. With a simple call to layout, you don’t see that step. By creating a GoLayout(type)Network (e.g. GoLayoutTreeNetwork, you can “edit” this intermediate data structure before calling our layout. So, you aren’t actually “writing an autolayout”. That’s what those samples do… edit that network (just not the same way you want).

With AutoLayout, it is the “From” and “To” that matters, not arrowheads. those are just decoration.

Dear Jake,
Thank you very much…