Find out if link is orthogonal or manually changed

Hallo, is there a possibility to find out whether a link uses the default orthogonal path or a manual path? I’m overriding the UpdateRouteDataPoints method in the PartManager to copy all link points to the data model. However, because we are using a huge number of diagrams which are also serialized as XML, it would be great to store the points only in case that a manual path is used for the link.

I suggest that you customize the LinkReshapingTool so that it sets a property on the link data so that you know it has been manually reshaped and thus you really do want to preserve the route. I think you can do that in an override of LinkReshapingTool.DoMouseUp.

Thank you very much for the fast reply. Finding that a route was changed manually works perfectly with your suggestion. This is already a nice improvement, but now I’m trying to find out if the route was changed back to the default orthogonal route, for example when a connected node was moved. My first idea was to override the MoveParts method in the DraggingTool and to reset the new Property on the data model for all links which are connected to a moved Node. However, when multiple nodes are selected, there are situations where links are not reset to their default route. Hence, this logic does not fit. Is there some method or event which is called respectively raised when an orthognal route is calculated again?

http://goxam.com/3.0/apiCore/index.html#Northwoods.GoWPF~Northwoods.GoXam.Route~ComputePoints.html

Override it to call the super method. If it returns true, clear your flag.