Creates a new duct that connects to the connector.
Namespace: Autodesk.Revit.DB.Mechanical
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public static Duct Create( Document document, ElementId ductTypeId, ElementId levelId, Connector startConnector, XYZ endPoint )
Parameters
- document Document
- The document.
- ductTypeId ElementId
- The ElementId of the new duct type.
- levelId ElementId
- The level id for the new duct.
- startConnector Connector
- The first connector where the new duct starts.
- endPoint XYZ
- The second point of the new duct.
Return Value
DuctThe created duct.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The duct type ductTypeId is not valid duct type. -or- The ElementId levelId is not a Level. -or- The connector's domain is not Domain.​DomainHvac. -or- The points of startConnector and endPoint are too close: for MEPCurve, the minimum length is 1/10 inch. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | Thrown when the new duct fails to connect with the connector. |