Places caps on the open connectors of the pipe curve, pipe fitting or pipe accessory.
Namespace: Autodesk.Revit.DB.PlumbingAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2014
Syntax
C# |
---|
public static void PlaceCapOnOpenEnds( Document document, ElementId elemId, ElementId typeId ) |
Visual Basic |
---|
Public Shared Sub PlaceCapOnOpenEnds ( _ document As Document, _ elemId As ElementId, _ typeId As ElementId _ ) |
Visual C++ |
---|
public: static void PlaceCapOnOpenEnds( Document^ document, ElementId^ elemId, ElementId^ typeId ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document.
- elemId
- Type: Autodesk.Revit.DB..::..ElementId
Element id of pipe curve, pipe fitting or pipe accessory.
- typeId
- Type: Autodesk.Revit.DB..::..ElementId
Pipe type element id. Default is invalidElementId.
Remarks
In order to place the cap, the cap type should be defined in the routing preferences that associates with the pipe type of the given element.
If the typeId is a valid element id, it will be used to override the pipe type that associates with the pipe type of the given element.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The element elemId does not exist in the document -or- The element elemId is neither an object of pipe curve, pipe fitting, nor pipe accessory. -or- The element elemId has no opened piping connector. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..InvalidOperationException | this operation failed. |