revit-apirevitpythonshellpyrevit

Selection, Sorting and Highlighting Elements in the selected order using PickObjects() method (Revit API)


Is there a method Revit API where I can select elements in order, highlighting the elements selection.

Please note, Selection.PickObjects() does the selection & highlighting but does not save the elements in the order of Selection.


Solution

  • It is exactly as you say. No, the Revit API does not provide a built-in method providing the functionality you require. You can implement it yourself by calling PickObject repeatedly in a loop and collecting the selected elements in your own sorted list.