Input selected object in Rhino to Grasshopper?

Hi, I’m looking to use the selected object in Rhino as an input for an interactive script. There are two components I know of that allow me to do this, these are Heteroptera’s Pick Object and Sasquatch’s Objects By Selection.


Unfortunately, I encounter issues with both. Heteroptera’s Pick Object component fails when I open a document with the component, which means that I always have to replace said component to make it work again.
For Sasquatch’s Objects By Selection: it does not automatically update when I change the selected object. This means I have to use a trigger component, which in turn keeps expiring all downstream objects at the trigger’s interval. As a result, longer computations and bakes are triggered as well.
Is there another way to achieve what I want (check which object’s are selected in Rhino from within Grasshopper)?

R8 Objects by selection.gh (12.0 KB)
R8 Objects by selection.3dm (45.8 KB)

Hi @Intuos,

How about this C# component for GH that will update it’s output when you select an object in rhino?

2 Likes

Thanks, Anders Python component works perfect to fetch the geometry.
I did make some modifications based on someone elses Toggle suggestion.


240207_GetSelectedRhinoGeometry_00.gh (10.8 KB)

I tried to copy/ paste the script into the new Python editor, but I have to manually run it each time to get the component to recompute (as you can tell by the lower Run count). Not sure why that is. I still haven’t gotten into coding yet…

That’s great but if you need it to run on the actual selection of the objects without a manual toggle this one may be more helpful?

Graph Space:

Model Space:

20250326_Get_Selected_Rhino_Objects_In_Grasshopper_Response_01a.gh (6.8 KB)

1 Like

Thanks! I’ll look into this one when I get home. I actually use a locked/unlocked layer state as a toggle, as I am attempting to use dimensions to modify wall placements (similar to Revit’s pop-up dimensions). So for me the trigger is easy to enable.
Not sure if it makes sense performance wise to limit the selected objects search based on input layers (e.g. interior & exterior wall layers) and/or a maximum number of selected items. I’ll filter for that and single object selection later anyways.

1 Like

In that case these posts also may (or may not be helpful?)

1 Like