element.getPortIndex(portId)
Returns the port index in the array of port items.