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)?
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…
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.