SetMaterialIdForCurrentExportState Method


This sets the material id that is to be associated with the element in the current export state.

Namespace: Autodesk.Revit.DB.IFC
Assembly: RevitAPIIFC (in RevitAPIIFC.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2012

Syntax

C#
public void SetMaterialIdForCurrentExportState(
	ElementId elementId
)
Visual Basic
Public Sub SetMaterialIdForCurrentExportState ( _
	elementId As ElementId _
)
Visual C++
public:
void SetMaterialIdForCurrentExportState(
	ElementId^ elementId
)

Parameters

elementId
Type: Autodesk.Revit.DBElementId
The material id.

Remarks

Even though there could be several materials associated with the element (set during PushExportState()), unless the element has support for IfcMaterialLayerSet, IFC output will include only this one.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →