The Selection
class has methods for allowing the user to select objects (single or multiple
selection) or even a point on screen. This allows the user to select one or
more Elements (or other objects, such as an edge or a face) using the cursor
and then returns control to your application. These functions do not
automatically add the new selection to the active selection collection. |
|
The PickObject()
method prompts the user to select an object in the Revit model. |
|
The PickObjects()
method prompts the user to select multiple objects in the Revit model. |
|
The
PickElementsByRectangle() method prompts the user to select multiple elements
using a rectangle, what is often also known as box select. |
|
The PickPoint()
method prompts the user to pick a point in the active sketch plane and this
returns the XYZ value corresponding to the picked point. |
|
The type of object
to be selected is specified when calling PickObject() or PickObjects. Types
of objects that can be specified are: Element, PointOnElement, Edge or Face. |
|
We can also add
custom status messages to the pick functions prompting users on what needs to
be selected or picked. This is done using the StatusbarTip. Each of the Pick
functions has an overload that has a String parameter in which a custom
status message can be provided. |