Revit 2024 API |
DuctLining..::..Create Method |
DuctLining Class See Also |
Creates a new instance of duct lining.
Namespace: Autodesk.Revit.DB.Mechanical
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:
2012
Syntax
C# |
---|
public static DuctLining Create( Document document, ElementId ductOrContentElementId, ElementId ductLiningTypeId, double Thickness ) |
Visual Basic |
---|
Public Shared Function Create ( _ document As Document, _ ductOrContentElementId As ElementId, _ ductLiningTypeId As ElementId, _ Thickness As Double _ ) As DuctLining |
Visual C++ |
---|
public: static DuctLining^ Create( Document^ document, ElementId^ ductOrContentElementId, ElementId^ ductLiningTypeId, double Thickness ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document.
- ductOrContentElementId
- Type: Autodesk.Revit.DB..::..ElementId
The duct, fitting or accessory ElementId to which lining will be added.
- ductLiningTypeId
- Type: Autodesk.Revit.DB..::..ElementId
The duct lining type. If the input duct lining type is InvalidElementId, the default lining type from the document will be used.
- Thickness
- Type: System..::..Double
The thickness of the lining.
Return Value
The newly created duct lining.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | This id does not represent a duct, fitting, or accessory element. -or- This duct Lining type is invalid. -or- Thickness is not valid for assignment to insulation or lining elements. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions..::..DisabledDisciplineException | None of the following disciplines is enabled: Mechanical Electrical Piping. |
Autodesk.Revit.Exceptions..::..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). |
Autodesk.Revit.Exceptions..::..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. |
Autodesk.Revit.Exceptions..::..ModificationOutsideTransactionException | The document has no open transaction. |