PlumbingUtilsPlaceCapOnOpenEnds Method |
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: 25.0.0.0 (25.0.0.0)
Syntaxpublic static void PlaceCapOnOpenEnds(
Document document,
ElementId elemId,
ElementId typeId
)
Public Shared Sub PlaceCapOnOpenEnds (
document As Document,
elemId As ElementId,
typeId As ElementId
)
public:
static void PlaceCapOnOpenEnds(
Document^ document,
ElementId^ elemId,
ElementId^ typeId
)
static member PlaceCapOnOpenEnds :
document : Document *
elemId : ElementId *
typeId : ElementId -> unit
Parameters
- document Document
-
The document.
- elemId ElementId
-
Element id of pipe curve, pipe fitting or pipe accessory.
- typeId ElementId
-
Pipe type element id.
Default is invalidElementId.
ExceptionsException | Condition |
---|
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.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
this operation failed.
|
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.
See Also