Creates a new pipe that connects to the connector.
Namespace: Autodesk.Revit.DB.Plumbing
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
C#
public static Pipe Create( Document document, ElementId pipeTypeId, ElementId levelId, Connector startConnector, XYZ endPoint )
Parameters
- document Document
- The document.
- pipeTypeId ElementId
- The ElementId of the new pipe type.
- levelId ElementId
- The level id for the new pipe.
- startConnector Connector
- The first connector where the new pipe starts.
- endPoint XYZ
- The second point of the new pipe.
Return Value
PipeThe pipe.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The pipe type pipeTypeId is not valid pipe type. -or- The ElementId levelId is not a Level. -or- The connector domain is not Domain.Piping. -or- The points of startConnector and endPoint are too close: for MEPCurve, the minimum length is 1/10 inch. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | Thrown when the new pipe fails to connect with the connector. |