Selection.PickElementsByRectangle
Prompts the user to select multiple elements by drawing a rectangle which pass a customer filter while showing a custom status prompt string.
Revit users will be permitted to manipulate the Revit view (zooming, panning, and rotating the view), but will not be permitted to click other items in the Revit user interface. Users are not permitted to switch the active view, close the active document or Revit application in the pick session, otherwise an exception will be thrown.
The selection will not be automatically added to the active selection buffer.
Note: this method must not be called during dynamic update, otherwise ForbiddenForDynamicUpdateException will be thrown.
public IList<Element> PickElementsByRectangle(
ISelectionFilter selectionFilter,
string statusPrompt
)
-
selectionFilterThe selection filter.
-
StringstatusPromptThe message shown on the status bar.
-
Thrown when the selectionFilter isor statusPrompt is.
-
Thrown when the Revit user cancelled this operation. Thrown when the Revit user tried to switch the active view, close the active document or Revit application when responding to this mode.
-
Thrown if this method is called during dynamic update.