Creates a new pipe that connects to the connector. The new pipe will have the same diameter and system type as the connector. If the connection fails, the method throws an exception.
Namespace: Autodesk.Revit.DB.Plumbing
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Since: 2015
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DB Document
The document.
- pipeTypeId
- Type: Autodesk.Revit.DB ElementId
The ElementId of the new pipe type.
- levelId
- Type: Autodesk.Revit.DB ElementId
The level id for the new pipe.
- startConnector
- Type: Autodesk.Revit.DB Connector
The first connector where the new pipe starts.
- endPoint
- Type: Autodesk.Revit.DB XYZ
The second point of the new pipe.
Return Value
The pipe.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | The pipe type pipeTypeId is not valid pipe type. -or- The level id levelId is not valid. -or- The connector is not a valid Piping connector. -or- The points of startConnector and endPoint are equal. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions DisabledDisciplineException | None of the following disciplines is enabled: Mechanical Electrical Piping. |