Link two Nodes

In a diagram with nodes and links, User wants to do more link by drag from one node to another node. However, the other node is not in the diagram, then the user release the mouse. At this time, I will start a new popup screen to allow user to add a node to the diagram. The problem is I do not know the last mouse position when the user release the mouse. Please tell me how to get it.

I did create LinkingNewTool which is

    Inherits GoToolLinkingNew
IN the  Stop  method, I started the popup screen. 

Thanks!

The Tool has a LastInput property, which is a GoInputEventArgs… and it has DocPoint.

Thanks a lot.

That helps a lot. However, after I inserted the node, I would like the link appears. How can I re-link the starting node and this newly inserted node?

Call linkingtool.DoNewLink(linkingtool.OriginalStartPort, port);

where “port” is the port on the newly created node.