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


Pipe Create(Document, Element Id, Element Id, Element Id, XYZ, XYZ) Method

Creates a new pipe from two points.

Namespace: Autodesk.Revit.DB.Plumbing
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public static Pipe Create(
	Document document,
	ElementId systemTypeId,
	ElementId pipeTypeId,
	ElementId levelId,
	XYZ startPoint,
	XYZ endPoint
)

Parameters

document Document
The document.
systemTypeId ElementId
The ElementId of the piping system type.
pipeTypeId ElementId
The ElementId of the pipe type.
levelId ElementId
The level ElementId for the pipe.
startPoint XYZ
The start point of the pipe.
endPoint XYZ
The end point of the pipe.

Return Value

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