Hello there!
You could try setting Initialized to true temporarily on the GoLink (or on the GoLabeledLink.RealLink if you are using a GoLabeledLink) just before and then back to false just after setting GoLink.FromPort and .ToPort. That will prevent those setters from calling GoLink.OnPortChanged, which is responsible for calling UpdateRoute. (And if you are using a GoLabeledLink, OnPortChanged would also call LayoutChildren.)
I found only the Initializing field, from GoObject. I have tried setting all the combinations (first I turned off links, then I tried with ports…). Everything. I get the same result after the port assignment. The links’ paths are updated, and they loose their intended look. Do you maybe have any other idea, or maybe some other way to do this?
Ooops, sorry, yes, I meant the Initializing property.