31 Aug 2021

Using TAB to cycle selection

In Revit is possible to use TAB key to select different nested elements. The Revit animation shows the hover and select behavior, note the status bar (bottom left) showing the names.

When the model is translated into SVF, it is organized using the Model Tree, so it is possible to mimic some of that behavior. There fore a few steps:

  1. Add an event listener to track keys, in this case TAB
  2. Get the current selection (can be 1 or more)
  3. Use the model tree to find the parents
  4. Select them

The above should work until we reach the root node. And it should keep track of the first selected element in order to cycle back to the initial selection. 

You can try it using the Forge Extensions library. Source code is also available. 

Revit TAB cycle selection

Related Article