SetFaceMaterialId Method


Sets material id to a face.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2016

Syntax

C#
public void SetFaceMaterialId(
	BRepBuilderGeometryId faceId,
	ElementId materialId
)
Visual Basic
Public Sub SetFaceMaterialId ( _
	faceId As BRepBuilderGeometryId, _
	materialId As ElementId _
)
Visual C++
public:
void SetFaceMaterialId(
	BRepBuilderGeometryId^ faceId, 
	ElementId^ materialId
)

Parameters

faceId
Type: Autodesk.Revit.DBBRepBuilderGeometryId
Id of the face to which material id will be added. faceId was returned by a call to AddFace().
materialId
Type: Autodesk.Revit.DBElementId
The material id associated with the face, or invalidElementId if none. It is not verified that materialId corresponds to a valid Material element.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The supplied face id doesn't correspond to a face stored in this BRepBuilder object.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException This BRepBuilder object isn't accepting new data, either because it has already been used to build geometry, or because of an error. Consult the State property of the BRepBuilder object for more details.

See Also