Creates a new instance of a PipeSegment and adds it to the document.
Namespace: Autodesk.Revit.DB.Plumbing
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- ADocument
- Type: Autodesk.Revit.DBDocument
The document where the PipeSegment will be created and added.
- MaterialId
- Type: Autodesk.Revit.DBElementId
The ElementId of the MaterialElem of the pipe segment.
- ScheduleId
- Type: Autodesk.Revit.DBElementId
The ElementId of the PipeScheduleType of the pipe segment.
- sizeSet
- Type: System.Collections.GenericICollectionMEPSize
A set of one or more sizes.
Return Value
The newly created pipe segment element.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | 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. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsDisabledDisciplineException | None of the following disciplines is enabled: Mechanical Electrical Piping. |