Link Avoidance and Selfloops!


Me again!
Ok…i have a subclass of GoNode with a FromPort and a ToPort on each side of the Rectangle node…when linking on itself, i would like the link to loop over or under the Node… I tried setting AvoidNodes and Orthogonal to true like suggested in an older post but nothing gives! Secondly i want something like the StateCharter sample when i have multiple links between two nodes…problem one is that interactively i cant even link two nodes twice…even if the To and From ports IsValidDuplicateLinks is true…secondly if i hard code two links…the curviness doesnt work…what am i doing wrong???


Well, with plain Orthogonal links, it seems to work just fine:
GoSimpleNode gsn1 = new GoSimpleNode();
gsn1.Initialize(null, null, “first”);
gsn1.Position = new PointF(100, 100);
gsn1.InPort.IsValidSelfNode = true;
gsn1.InPort.IsValidDuplicateLinks = true;
gsn1.OutPort.IsValidSelfNode = true;
gsn1.OutPort.IsValidDuplicateLinks = true;
GoLink gl = new GoLink();
gl.Orthogonal = true;
gl.FromPort = gsn1.OutPort;
gl.ToPort = gsn1.InPort;
gl.CalculateStroke();For curved (Bezier stroke style) links, instead of Line style, did you make sure the ports have FromSpot and ToSpot that are NoSpot?


I just did change the FromSpot and ToSpot to NoSpot but it doesnt change anything… the Link goes across my Node…i really dont get it… the curviness doesnt work neither so i must be missing something…but i copied the GoLabeled link of the state charter example …im really lost here


my probleme of duplicate links is solved by the way…but even if i modify the curviness…the links get drawn over one another.