PipeInsulationCreate Method |
Creates a new instance of pipe insulation.
Namespace: Autodesk.Revit.DB.PlumbingAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static PipeInsulation Create(
Document document,
ElementId pipeOrContentElementId,
ElementId pipeInsulationTypeId,
double Thickness
)
Public Shared Function Create (
document As Document,
pipeOrContentElementId As ElementId,
pipeInsulationTypeId As ElementId,
Thickness As Double
) As PipeInsulation
public:
static PipeInsulation^ Create(
Document^ document,
ElementId^ pipeOrContentElementId,
ElementId^ pipeInsulationTypeId,
double Thickness
)
static member Create :
document : Document *
pipeOrContentElementId : ElementId *
pipeInsulationTypeId : ElementId *
Thickness : float -> PipeInsulation
Parameters
- document Document
-
The document.
- pipeOrContentElementId ElementId
-
The pipe, fitting, accessory ElementId to which insulation will be added.
- pipeInsulationTypeId ElementId
-
The pipe insulation type.
If the input pipe insulation type is InvalidElementId, the default insulation type from the document will be used.
- Thickness Double
-
The thickness of the insulation.
Return Value
PipeInsulation
The newly created pipe insulation.
ExceptionsException | Condition |
---|
ArgumentException |
This id does not represent a pipe, fitting, or accessory element.
-or-
This pipe insulation type is invalid.
-or-
Thickness is not valid for assignment to insulation or lining elements.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
The document is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
|
ModificationForbiddenException |
The document is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
-or-
The document is being loaded, or is in the midst of another
sensitive process.
|
ModificationOutsideTransactionException |
The document has no open transaction.
|
See Also