i need to add extra ports to the nodes at the time of resizing the selected node of the diagram.
Do you need to add port elements, or do you just want the links to be separated from each other where they connect to the node?
For the former functionality, as an example of additional logical and physical ports, look at the DynamicPorts sample.
For the latter functionality, you just need to set the go:Node.FromSpot and ToSpot properties to be “Side” values. As an example, look at the tanks in the Piping sample. Or at the DiskStorage node in the LinkDemo sample. Those nodes use spot values that are “AllSides”.