Position objects while in layout

Hi,

Can i force a position of a certain object while its beeing layout?
thanks,
Adi

With regard to specifying an absolute position of a node, without fixing the positions of other nodes, it depends on which GoLayout you are using.

For force-directed, yes: set GoLayoutForceDirectedNode.IsFixed = true.

For tree, yes for the root nodes: set GoLayoutTree.Arrangement = GoLayoutTreeArrangement.FixedRoots.

For layered-digraph, no.

I’m using the layered digraph and my problem is that even if all the objects inside a gosubgraph are symmetric (the same) i don’t get them arranged in the middle of the subgraph. i thought that forcing the position of the first object will help the links look better.

Layered digraph tends to do upper left rather than centering… which is why you are centering the main diagram after a layout. You could do the same thing in the subgraphs… after the layout, find each subgraph, compute the width of the objects within the subgraph and then slide them over 1/2 the width of the space in the subgraph. (you can use GoView.MoveSelection on the collection of objects in the subgraph).