Revit 2025 API
Flex |
Creates a new flexible pipe into the document, using a point array and flex pipe type.
Namespace: Autodesk.Revit.DB.Plumbing
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static FlexPipe Create( Document document, ElementId systemTypeId, ElementId pipeTypeId, ElementId levelId, XYZ startTangent, XYZ endTangent, IList<XYZ> points )
Public Shared Function Create ( document As Document, systemTypeId As ElementId, pipeTypeId As ElementId, levelId As ElementId, startTangent As XYZ, endTangent As XYZ, points As IList(Of XYZ) ) As FlexPipe
public: static FlexPipe^ Create( Document^ document, ElementId^ systemTypeId, ElementId^ pipeTypeId, ElementId^ levelId, XYZ^ startTangent, XYZ^ endTangent, IList<XYZ^>^ points )
static member Create : document : Document * systemTypeId : ElementId * pipeTypeId : ElementId * levelId : ElementId * startTangent : XYZ * endTangent : XYZ * points : IList<XYZ> -> FlexPipe
Parameters
- document Document
- The document.
- systemTypeId ElementId
- The id of the piping system type.
- pipeTypeId ElementId
- The id of the flexible pipe.
- levelId ElementId
- The level id for the flexible pipe.
- startTangent XYZ
- The tangent vector at the start of the curve. The invalid or zero vector is ignored.
- endTangent XYZ
- The tangent vector at the end of the curve. The invalid or zero vector is ignored.
- points IListXYZ
- The point array indicating the path of the flexible pipe, including the end point.
Return Value
FlexPipeIf creation was successful then a new flexible pipe is returned, otherwise an exception with failure information will be thrown.

Exception | Condition |
---|---|
ArgumentException | The systemTypeId is not valid piping system type. -or- The type pipeTypeId is not valid flexible pipe 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