LinkingTool - Temporary Link To/From Nodes

I am running into a weird issue with my LinkingTool where the TemporaryLink.FromNode and TemporaryLink.FromPort (as well as on the To end) are null even if the Link is connected. Everything works fine when drawing links from nodes initially (the temporary link has node & port information where appropriate) until a link is created from one node to another. After that, linking from any node on the diagram does not have the node & port information, which is causing some issues with my link routing.

Any ideas for how I can fix this?

Thanks
Ryan

Well, that’s not a problem normally, is it? So I’m wondering what changes you have made to the LinkingTool.

Tough to say if it’s a problem normally, because the routing behavior that results when the issue comes up is the tools default routing… So it may be happening in the demos, but the default routing happens the same whether the temporary link is connected or not.

There isn’t anything in my LinkingTool that sets the node or port anywhere… Where is it initially set that I can monitor to see if its being set when I’m expecting it to?

It now seems that the problem is that the ToPort is staying set as the port to which the link between the 2 nodes for all new temporary links.

Ex) If I create a link from A® -> B(L) then every time I try to create an open ended link after that, say a link from C(B) -> “”, the temporary links ToPort still shows “L” from the previous connection.

First, LinkingTool.TemporaryToPort is a read-only property the just returns the LinkingTool.TemporaryToNode.VisualElement.

Second, once the LinkingTool is started, it keeps reusing the same TemporaryFromNode, TemporaryToNode, and TemporaryLink. So I don’t understand how those properties could become null, unless some code is setting those properties.

Or unless there’s a different LinkingTool…