SetElementIds Method


Selects the elements.

Namespace: Autodesk.Revit.UI.Selection
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2015

Syntax

C#
public void SetElementIds(
	ICollection<ElementId> elementIds
)
Visual Basic
Public Sub SetElementIds ( _
	elementIds As ICollection(Of ElementId) _
)
Visual C++
public:
void SetElementIds(
	ICollection<ElementId^>^ elementIds
)

Parameters

elementIds
Type: System.Collections.GenericICollectionElementId
The ids of the elements to be selected.

Remarks

This function will select the specified elements within the project and update the UI. See SetReferences for more selection options.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Changing the selection is not permitted while handling SelectionChanged Event.

See Also