Programmatically Finish PickObjects Selection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When utilizing a multi-selection mode via the Revit API such as:
uidoc.Selection.PickObjects()
A manual "Finish" click is required to close the selection mode.
Question
I am wondering if there is a way to programmatically click or finish this step for us? My use case for this results from the need to perform several selections of different objects at a time and continuing onto functions such as basic get/set operations on those selections until the user decides to end. As a basic example:
- Run command (via keyboard shortcut)
- select objects
- Click finish (At this stage I would love to press a key or have a flag that finishes the selection programmatically)
- Perform some operations on selected elements such as set a parameter
- Repeat from step 2 or until command is terminated.
Problem
The current "problem" is that the manual click of finishing a selection slows down the process for what I am trying to achieve. I know to a certain extent with a single selection mode, a pick and perform operation is possible until exited from a while loop but in the case of pick objects, again the finish prompt is required and the pickobjects is desired mostly because it allows quick window selection of multiple objects at a time.