Selection Class |
Contains the current user selection of elements within the project.

System Object
Autodesk.Revit.UI.Selection Selection
Autodesk.Revit.UI.Selection Selection
Namespace: Autodesk.Revit.UI.Selection
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.3.0.0 (25.3.0.0)

The Selection type exposes the following members.

Name | Description | |
---|---|---|
![]() | IsValidObject | Specifies whether the .NET object represents a valid Revit entity. |

Name | Description | |
---|---|---|
![]() | Dispose | Releases all resources used by the Selection |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object ) |
![]() | GetElementIds | Returns the ids of the elements that are currently selected within the project. The selection may not be complete. See GetReferences for more options. |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object ) |
![]() | GetReferences | Returns the references that are currently selected. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object ) |
![]() | PickBox(PickBoxStyle) | Invokes a general purpose two-click editor that lets the user to specify a rectangular area on the screen. |
![]() | PickBox(PickBoxStyle, String) | Invokes a general purpose two-click editor that lets the user to specify a rectangular area on the screen. |
![]() | PickElementsByRectangle | Prompts the user to select multiple elements by drawing a rectangle. |
![]() | PickElementsByRectangle(ISelectionFilter) | Prompts the user to select multiple elements by drawing a rectangle which pass a customer filter. |
![]() | PickElementsByRectangle(String) | Prompts the user to select multiple elements by drawing a rectangle while showing a custom status prompt string. |
![]() | PickElementsByRectangle(ISelectionFilter, String) | Prompts the user to select multiple elements by drawing a rectangle which pass a customer filter while showing a custom status prompt string. |
![]() | PickObject(ObjectType) | Prompts the user to select one object. |
![]() | PickObject(ObjectType, ISelectionFilter) | Prompts the user to select one object which passes a custom filter. |
![]() | PickObject(ObjectType, String) | Prompts the user to select one object while showing a custom status prompt string. |
![]() | PickObject(ObjectType, ISelectionFilter, String) | Prompts the user to select one object which passes a custom filter while showing a custom status prompt string. |
![]() | PickObjects(ObjectType) | Prompts the user to select multiple objects. |
![]() | PickObjects(ObjectType, ISelectionFilter) | Prompts the user to select multiple objects which pass a customer filter. |
![]() | PickObjects(ObjectType, String) | Prompts the user to select multiple objects while showing a custom status prompt string. |
![]() | PickObjects(ObjectType, ISelectionFilter, String) | Prompts the user to select multiple objects which pass a custom filter while showing a custom status prompt string. |
![]() | PickObjects(ObjectType, ISelectionFilter, String, IList Reference ) | |
![]() | PickPoint | Prompts the user to pick a point on the active work plane. |
![]() | PickPoint(ObjectSnapTypes) | Prompts the user to pick a point on the active work plane using specified snap settings. |
![]() | PickPoint(String) | Prompts the user to pick a point on the active work plane while showing a custom status prompt string. |
![]() | PickPoint(ObjectSnapTypes, String) | Prompts the user to pick a point on the active work plane using specified snap settings while showing a custom status prompt string. |
![]() | SetElementIds | |
![]() | SetReferences | |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object ) |

The Selection object is used to retrieve the current user selected elements when an external API command is executed.
