SetLayerSelection Method


Base Import Options Set Layer Selection Method

Set the layers name which user want to import into Revit.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void SetLayerSelection(
	ICollection<string> layerSelection
)

Parameters

layerSelection ICollection String
The layers imported into Revit.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
If user don't set any layer selection, all layers would be imported into Revit for dgn. But for dwg|dxf, all layers (or visible layers, it is up to visibleLayersOnly was set or not) would be imported into Revit.
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 →