DuctInsulationCreate Method |
Creates a new instance of duct insulation.
Namespace: Autodesk.Revit.DB.MechanicalAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static DuctInsulation Create(
Document document,
ElementId ductOrContentElementId,
ElementId ductInsulationTypeId,
double Thickness
)
Public Shared Function Create (
document As Document,
ductOrContentElementId As ElementId,
ductInsulationTypeId As ElementId,
Thickness As Double
) As DuctInsulation
public:
static DuctInsulation^ Create(
Document^ document,
ElementId^ ductOrContentElementId,
ElementId^ ductInsulationTypeId,
double Thickness
)
static member Create :
document : Document *
ductOrContentElementId : ElementId *
ductInsulationTypeId : ElementId *
Thickness : float -> DuctInsulation
Parameters
- document Document
-
The document.
- ductOrContentElementId ElementId
-
The duct , fitting or accessory ElementId to which insulation will be added.
- ductInsulationTypeId ElementId
-
The duct insulation type.
If the input duct insulation type is InvalidElementId, the default insulation type from the document will be used.
- Thickness Double
-
The thickness of the insulation.
Return Value
DuctInsulation
The newly created duct insulation.
ExceptionsException | Condition |
---|
ArgumentException |
This id does not represent a duct, fitting, or accessory element.
-or-
This duct 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