Revit 2016 API |
MechanicalUtils..::..ConnectAirTerminalOnDuct Method |
MechanicalUtils Class See Also |
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: 16.0.0.0 (16.0.0.0)
Since:
2014
Syntax
C# |
---|
public static bool ConnectAirTerminalOnDuct( Document document, ElementId airTerminalId, ElementId ductCurveId ) |
Visual Basic |
---|
Public Shared Function ConnectAirTerminalOnDuct ( _ document As Document, _ airTerminalId As ElementId, _ ductCurveId As ElementId _ ) As Boolean |
Visual C++ |
---|
public: static bool ConnectAirTerminalOnDuct( Document^ document, ElementId^ airTerminalId, ElementId^ ductCurveId ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document.
- airTerminalId
- Type: Autodesk.Revit.DB..::..ElementId
The air terminal id.
- ductCurveId
- Type: Autodesk.Revit.DB..::..ElementId
The duct curve id.
Return Value
True if connection succeeds, false otherwise.
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.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..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. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |