FlexDuctCreate(Document, ElementId, ElementId, ElementId, IListXYZ) Method |
Creates a new flexible duct into the document, using a point array and flexible duct type.
Namespace: Autodesk.Revit.DB.MechanicalAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static FlexDuct Create(
Document document,
ElementId systemTypeId,
ElementId ductTypeId,
ElementId levelId,
IList<XYZ> points
)
Public Shared Function Create (
document As Document,
systemTypeId As ElementId,
ductTypeId As ElementId,
levelId As ElementId,
points As IList(Of XYZ)
) As FlexDuct
public:
static FlexDuct^ Create(
Document^ document,
ElementId^ systemTypeId,
ElementId^ ductTypeId,
ElementId^ levelId,
IList<XYZ^>^ points
)
static member Create :
document : Document *
systemTypeId : ElementId *
ductTypeId : ElementId *
levelId : ElementId *
points : IList<XYZ> -> FlexDuct
Parameters
- document Document
-
The document.
- systemTypeId ElementId
-
The id of the HVAC system type.
- ductTypeId ElementId
-
The id of the flexible duct.
- levelId ElementId
-
The level id for the flexible duct.
- points IListXYZ
-
The point array indicating the path of the flexible duct, including the end point.
Return Value
FlexDuct
If creation was successful then a new flexible duct is returned, otherwise an exception with failure information will be thrown.
ExceptionsException | Condition |
---|
ArgumentException |
The systemTypeId is not valid HVAC system type.
-or-
The type ductTypeId is not valid flexible duct type.
-or-
The ElementId levelId is not a Level.
-or-
The valid number of points is less than two. In order to create a flex curve, at least two points are required. Note the duplicate points don't take into account.
|
ArgumentNullException |
A non-optional argument was null
|
See Also