How to calculate port position dynamically

Hi,

WE have created a node with ports placed dynamically on top, with a standard margin between them.

Is there any way to calculate the position of the port using its portid, so as to place a node object over the port

Thanks
Gayathri

node.findPort(portid).getDocumentPoint(go.Spot.Center)

thanks , this helped .