Create Method (Document, ElementId, ElementId, ElementId, XYZ, XYZ, IList(XYZ))


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: 22.0.0.0 (22.1.0.0)
Since: 2014

Syntax

C#
public static FlexPipe Create(
	Document document,
	ElementId systemTypeId,
	ElementId pipeTypeId,
	ElementId levelId,
	XYZ startTangent,
	XYZ endTangent,
	IList<XYZ> points
)
Visual Basic
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
Visual C++
public:
static FlexPipe^ Create(
	Document^ document, 
	ElementId^ systemTypeId, 
	ElementId^ pipeTypeId, 
	ElementId^ levelId, 
	XYZ^ startTangent, 
	XYZ^ endTangent, 
	IList<XYZ^>^ points
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
systemTypeId
Type: Autodesk.Revit.DB ElementId
The id of the piping system type.
pipeTypeId
Type: Autodesk.Revit.DB ElementId
The id of the flexible pipe.
levelId
Type: Autodesk.Revit.DB ElementId
The level id for the flexible pipe.
startTangent
Type: Autodesk.Revit.DB XYZ
The tangent vector at the start of the curve. The invalid or zero vector is ignored.
endTangent
Type: Autodesk.Revit.DB XYZ
The tangent vector at the end of the curve. The invalid or zero vector is ignored.
points
Type: System.Collections.Generic IList XYZ
The point array indicating the path of the flexible pipe, including the end point.

Return Value

If creation was successful then a new flexible pipe is returned, otherwise an exception with failure information will be thrown.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions 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.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Mechanical Electrical Piping.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →