Creates a new instance of a PipeSegment and adds it to the document.
Namespace: Autodesk.Revit.DB.PlumbingAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static PipeSegment Create(
Document ADocument,
ElementId MaterialId,
ElementId ScheduleId,
ICollection<MEPSize> sizeSet
)
Public Shared Function Create (
ADocument As Document,
MaterialId As ElementId,
ScheduleId As ElementId,
sizeSet As ICollection(Of MEPSize)
) As PipeSegment
public:
static PipeSegment^ Create(
Document^ ADocument,
ElementId^ MaterialId,
ElementId^ ScheduleId,
ICollection<MEPSize^>^ sizeSet
)
static member Create :
ADocument : Document *
MaterialId : ElementId *
ScheduleId : ElementId *
sizeSet : ICollection<MEPSize> -> PipeSegment
Parameters
- ADocument Document
-
The document where the PipeSegment will be created and added.
- MaterialId ElementId
-
The ElementId of the MaterialElem of the pipe segment.
- ScheduleId ElementId
-
The ElementId of the PipeScheduleType of the pipe segment.
- sizeSet ICollectionMEPSize
-
A set of one or more sizes.
Return Value
PipeSegment
The newly created pipe segment element.
ExceptionsException | Condition |
---|
ArgumentException |
The size list is empty.
-or-
The MaterialId and ScheduleId was already used by another pipe segment. Please use a new Material, a new Schedule/Type, or both.
|
ArgumentNullException |
A non-optional argument was null
|
See Also