Dynamic port

dynamic port has to created when the link is established and it should be straight line?

Straight links between ports is simple, just set the port.FromSpot & ToSpot to be NoSpot.

p.FromSpot = GoObject.NoSpot;
p.ToSpot = GoObject.NoSpot;
You can always add ports to a node. See Demo1.AutoLinkNode for one example.
Let me know if that isn't what you had in mind...

I can’t find Demo1 in the demos. Is there a newer version of this demo. I just downloaded this software a month or so ago.

Demo1 was split into DrawDemo and NodeLinkDemo in 4.0. AutoLinkNode is in NodeLinkDemo.