| Revit 2018 API |
| Element..::..GetMaterialVolume Method |
| Element Class See Also |
Gets the volume of the material with the given id.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.13)
Since:
2014
Syntax
| C# |
|---|
public double GetMaterialVolume( ElementId materialId ) |
| Visual Basic |
|---|
Public Function GetMaterialVolume ( _ materialId As ElementId _ ) As Double |
| Visual C++ |
|---|
public: double GetMaterialVolume( ElementId^ materialId ) |
Parameters
- materialId
- Type: Autodesk.Revit.DB..::..ElementId
The material id returned from GetMaterialIds(Boolean).
Return Value
The volume of the material for this element. Returns 0.0 if the material is not a part of this element.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | materialId is not a valid Element identifier. |
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |