Links and Avoiding Nodes

Howdy

I found the AvoidNodes property for links and Im trying to get it to work But I am still having links that cross over some of the nodes In my diagrams. Is there any way to have links avoid the nodes?
Thanks

Can you upload a screenshot? (Use the “post reply” button on the bottom right of the screen)

Those don’t look like links with the AvoidsNodes property.



If you drop a node on top of a link, that link won’t re-route until either end of the link is moved. You can force that by calling GoLink.CalculateRoute.



Play with the Flowgrammer sample at http://godotnetweb.com/Flowgrammer/WebForm1.aspx and turn on “movable nodes” to see how AvoidsLinks behaves.

OK maybe Im not asking the right question.

Basically Im creating this graphic from data. Im creating the nodes and giving them their positions. Then I am putting the links in.
Is there a way to avoid crossing the nodes? I thought thats what the property for avoiding Nodes was for.

You can control when links are re-routed by setting the GoDocument.RoutingTime property.

Uhm let me try asking a different way. I think I must be making it more confusing then it really is.
When the diagram is created by the web application.
Is there a way to avoid crossing over the nodes with labeled links that go between other nodes in the diagram. The user is not involved in this at all except they have opened the page. Its all being rendered automatically from the web application.

ok… if you are creating the links after the nodes are placed, they should get routed around the nodes.



You could do this after everything is added:



foreach (GoObject o in doc) {

GoLabeledLink l = o as GoLabeledLink;

if (l != null) l.RealLink.CalculateRoute();

}



just to be sure.



Also… set the EndSegmentLength to 25 or so on your “In” ports to give the arrowhead some room. It will look better.

I will reiterate… the links in your screenshot don’t look like they have the AvoidsNodes = true property. Link NL 4443 would look different than that even if there were only 2 nodes in the display. (it would would make the vertical path sooner, it wouldn’t go to the half way point)

Ok That Last Post did the trick. Its avoiding it nicely now. Thank you!!!

Thanks for the tip with the EndSegment Length. It does make it look alot better!

Thanks for all your help!