CreateStyle Method (ExporterIFC, IFCAnyHandle, Color, ElementId)


Creates and populates an IfcStyledItem for an IfcRepresentationItem with a IfcSurfaceStyle, IfcCurveStyle, and/or an IfcFillStyle, and assigns them to the file.

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

Syntax

C#
public IFCAnyHandle CreateStyle(
	ExporterIFC exporterIFC,
	IFCAnyHandle repItem,
	Color color,
	ElementId fillPatternId
)
Visual Basic
Public Function CreateStyle ( _
	exporterIFC As ExporterIFC, _
	repItem As IFCAnyHandle, _
	color As Color, _
	fillPatternId As ElementId _
) As IFCAnyHandle
Visual C++
public:
IFCAnyHandle^ CreateStyle(
	ExporterIFC^ exporterIFC, 
	IFCAnyHandle^ repItem, 
	Color^ color, 
	ElementId^ fillPatternId
)

Parameters

exporterIFC
Type: Autodesk.Revit.DB.IFCExporterIFC
The exporter.
repItem
Type: Autodesk.Revit.DB.IFCIFCAnyHandle
The representation item.
color
Type: Autodesk.Revit.DBColor
The color.
fillPatternId
Type: Autodesk.Revit.DBElementId
The fill pattern id.

Return Value

The handle.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException A transaction is required for this operation.

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 →