Question about node ports

Hi, <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

If I have a lot of ports in a node and when I add the link I give a port id that doesn't exist then I think the link will connect to some visual element.

Is there a way to set a default port in case the link has a bad port id that doesn't exist in the node?


As the documentation for Node.FindPort states, if it cannot find an element marked with the given PortId, it tries to find a default port that is marked with a PortId that is an empty string. If it cannot find such an element, it uses the whole node, the Node.VisualElement.