SetElementIds Method


Selection Set Element Ids Method

Selects the elements.

Namespace: Autodesk.Revit.UI.Selection
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void SetElementIds(
	ICollection<ElementId> elementIds
)

Parameters

elementIds ICollection ElementId
The ids of the elements to be selected.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
InvalidOperationException Changing the selection is not permitted while handling SelectionChanged Event.
Remarks
This function will select the specified elements within the project and update the UI. See SetReferences for more selection options.
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 →