Node linking to itself


#1

-How can i link a node to itself from an outgoing port to an incoming port…because my graph accepts loops on states.
thanks


#2

Programmatically you can just create the link, set the FromPort and ToPort, add the link to the document, and maybe call GoLink.CalculateStroke() in case it needs an additional opportunity to figure out its path once it is part of a document.
Interactively, you’ll need to set both ports’ GoPort.IsValidSelfNode properties to true, to allow such a link to be valid for the user to draw.


#3

Thanks! I wanted to do it interactively and didnt see the IsValidSelfNode property!