Skip to content

MechanicalUtils.ConnectAirTerminalOnDuct

Public Class

Connects an air terminal to a duct directly (without the need for a tee or takeoff).

Namespace: Autodesk.Revit.DB.Mechanical

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public static bool ConnectAirTerminalOnDuct(
Document document,
ElementId airTerminalId,
ElementId ductCurveId
)

Parameters

document Document

The document.

airTerminalId ElementId

The air terminal id.

ductCurveId ElementId

The duct curve id.

Return Value

Boolean
True if connection succeeds, false otherwise.

Exceptions

Exception

Condition


ArgumentException

The familyinstance is not air terminal. -or- The element is not duct curve. -or- The air terminal already has physical connection. -or- The air terminal connector origin doesn’t project within the center line of the duct.


ArgumentNullException

A non-optional argument was null


Remarks

The current location of the air terminal will be projected to the duct centerline, and if the point can be successfully projected, the air terminal will be placed on the most suitable face of the duct.