To check the connection direction:
connection-direction (item1, connection1) -> symbol
input, output, or none to indicate whether connection1 connected to item1 is directed and, if so, whether it is an input or output connection. The connection1 must be connected directly to item1. If this function returns a direction of
none, you cannot specify with direction none in a connection statement. Instead, do not enter any direction statement.
To check the connection portname:
connection-portname (item1, connection1) -> symbol
To check the connection position:
connection-position (item1, connection1) -> integer

To check the connection side:
connection-side (item1, connection1) -> symbol
top, bottom, left, or right, indicating the side of item1 to which the connection1 is attached.
To check the connection style:
connection-style (item1, connection1) -> symbol
diagonal or orthogonal as the style of connection1.
You can constrain the execution of the body of a rule that detects a connection/disconnection event (described under Detecting Connection and Disconnection Events) by making such execution conditional on one of these functions.
To check whether two items are directly connected in any way:
items-are-connected (item1: class item, item2: class item)
-> truth-value
true if any connection whatsoever directly connects item1 and item2; else false. Example:
![]() |
To check whether two items are directly connected in a specified direction:
items-are-connected-with-direction (item1: class item, item2: class item, item1-direction: symbol)
-> truth-value
true if a connection runs from item1 to item2 and has the specified direction relative to item1; else false. Example:
![]() |
To check whether two items are directly connected at specified ports:
items-are-connected-at-ports (item1: class item, item2: class item,
portname1: symbol, portname2: symbol)
-> truth-value
true if a connection runs from item1 to item2 and connects to portname1 on item1 and portname2 on item2; else false. To specify that a portname does not matter, specify any. Example:
![]() |