MaterialId Property


The id of the material applied to this element.

Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2014

Syntax

C#
public ElementId MaterialId { get; set; }
Visual Basic
Public Property MaterialId As ElementId
	Get
	Set
Visual C++
public:
property ElementId^ MaterialId {
	ElementId^ get ();
	void set (ElementId^ value);
}

Remarks

This applies to TopographySurface and SiteSubRegion elements.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException When setting this property: The materialId cannot map to a valid material element.
Autodesk.Revit.Exceptions ArgumentNullException When setting this property: A non-optional argument was null

See Also