DuctCreate(Document, ElementId, ElementId, ElementId, XYZ, XYZ) Method |
Creates a new duct from two points.
Namespace: Autodesk.Revit.DB.MechanicalAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Duct Create(
Document document,
ElementId systemTypeId,
ElementId ductTypeId,
ElementId levelId,
XYZ startPoint,
XYZ endPoint
)
Public Shared Function Create (
document As Document,
systemTypeId As ElementId,
ductTypeId As ElementId,
levelId As ElementId,
startPoint As XYZ,
endPoint As XYZ
) As Duct
public:
static Duct^ Create(
Document^ document,
ElementId^ systemTypeId,
ElementId^ ductTypeId,
ElementId^ levelId,
XYZ^ startPoint,
XYZ^ endPoint
)
static member Create :
document : Document *
systemTypeId : ElementId *
ductTypeId : ElementId *
levelId : ElementId *
startPoint : XYZ *
endPoint : XYZ -> Duct
Parameters
- document Document
-
The document.
- systemTypeId ElementId
-
The id of the HVAC system type.
- ductTypeId ElementId
-
The id of the duct type.
- levelId ElementId
-
The level ElementId for the duct.
- startPoint XYZ
-
The start point of the duct.
- endPoint XYZ
-
The end point of the duct.
Return Value
Duct
The created duct.
ExceptionsException | Condition |
---|
ArgumentException |
The systemTypeId is not valid HVAC system type.
-or-
The duct type ductTypeId is not valid duct type.
-or-
The ElementId levelId is not a Level.
-or-
The points of startPoint and endPoint are too close: for MEPCurve, the minimum length is 1/10 inch.
|
ArgumentNullException |
A non-optional argument was null
|
See Also