lynx.Diagram.add_connection

Diagram.add_connection(connection_id: str, source_block_id: str, source_port_id: str, target_block_id: str, target_port_id: str, label: str | None = None) ValidationResult[source]

Add a connection between two block ports with validation.

Parameters:
  • connection_id – Unique connection identifier

  • source_block_id – ID of source block

  • source_port_id – ID of source port (must be output)

  • target_block_id – ID of target block

  • target_port_id – ID of target port (must be input)

  • label – Optional label for the connection

Returns:

ValidationResult indicating success or failure with error messages