Save/Load self links

How properly persist the layout of Besier “Self” Link? I save links
throuth custom serialization storing theLink.RealLink.CopyPointsArray()
after i restore link on the diagram i do

It looks ok but if i move node (that link is linked to) link
recalculates so the original form of the link is distorted.
LinkAdjustinStyle is Stretch.
It seems like i need to do something with ports after SetPoints because
ports give wrong from and to points for the link.

Any advise?

Does the port have the same properties as it did originally? .FromSpot, .ToSpot, .Bounds?
Perhaps if you are saving and restoring the Bounds of the node, and if the node’s SelectionObject is not the node itself, the Bounds of the Port will not be the same, depending on how resizing is defined for that node. Either save and restore the Bounds of the SelectionObject, or maybe just save and restore the Location of the node if the size doesn’t really need to be saved.