BuildingInformationModel.trace_connections

BuildingInformationModel.trace_connections(start, category=None, max_depth=None)

Trace elements reachable from start through interaction edges.

Performs a breadth-first walk over the interaction graph starting at start, following edges whose relationships match category (or, if category names a group in RELATIONSHIP_GROUPS, any relationship in that group). Useful for tracing connectivity networks such as MEP flow systems or chains of structurally connected members.

Parameters:
startGenericElement

The element to start the traversal from.

categorystr, optional

A relationship category (e.g. "connection", "structural") or a group name ("topology", "structural", "mep"). If None, follows edges of any category.

max_depthint, optional

Maximum number of edges to traverse from start. If None, the whole connected component is returned.

Returns:
list[GenericElement]

The reachable elements, excluding start itself, in breadth-first order.