Create connector port

The creation of connector ports is similar to the creation of node ports. To create connector ports, you need to define a port collection and assign it to the connector’s ports property.

The following code example shows how to create connector port.

Port alignment

The port can be aligned before, after, or at the center of the connector by utilizing the alignment property. By default, the port alignment is set to center.

The following code example shows how to set alignment to the connector port.

Port displacement

The connector port displacement allows users to adjust the position of ports relative to the connector. By setting displacement offsets, ports can be moved to precise locations along the connector.

The following code example shows how to set displacement to the connector port.

NOTE

The displacement will work only if we set alignment as after or before.

Connector port connection

To establish a connection between connectors, connector ports are utilized. For this connection, the sourcePortID or targetPortID should be set to the ID of the respective port on the connector.

The following code example explains how to connect connector to the connector port.

See also