Connecting two links together

Hello there!

Some time ago I made a topic about linking a GoLink to another GoLink. Now I'm finally back on the project. I have read your reply and have tried it but I can't seem to get it working. After that I tried to override GoToolLinkingNew. Now everything works as follows:
- A new GoNode is created at the place of connection. It looks like a small black dot.
- An original link that a dragged link was dropped to is divided in two new links. Those two new links follow the same path as the old one. So it looks as if it has never even changed.
Now I have done everything, the only problem left is to assign those links their ports, because as soon as I assign them, they change their shape (as normal orthogonal links). Is there a way to bypass this, because I need to keep their path, or is there some other sollution?
I'd like to keep them separated (not as the original one link) because it will ease my pain later on some other plans. If my idea can't be done, would you please propose another one, with some details.
Thank you in advance.

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.

You have four links, yes? The one original one that you delete, the new one being drawn, and the two new ones replacing the original one. You need to set Initializing to true on both of those replacement links before setting their FromPort and ToPort properties, and then set it back to false again after setting those two properties.