Live current selection in Revit and asynchronous solutions

Hi, I got two questions.

  1. Is it possible to receive current Revit element selection and pass it to Grasshopper? I need it to update automatically if selection i Revit changes.

  2. Will it be ever possible to run Rhino.Inside.Revit components asynchronously so the UI will not be locked by some time consuming operations like e.g. extracting geometry? Possible in GH1, GH2?

Hi Andrew,

  1. Yes you can. Use the Graphical Element ‘Active Selection’

If the GH Definition is open you can have your script ‘Do Something’ when an item is selected.

Here i override the color of the Wall (and remove previous element overrides)

ChangeColor

Active Selection.gh (16.0 KB)

Alternatively you use this definition as a GH Player Script that would do it as a one-off when the button is pressed.

The transactional nature of Revit requires a command to complete before the next one is started, which requires the user who is interactively scripting to plan accordingly.

3 Likes

Wow, that’s a hidden gem. Thank you. RiR is already a quite big set of tools, maybe a new batch of short videos could help people discover stuff like that.