Triggering Component remotely/simulating double-click on canvas

Hi all,

Does anyone know of a way in GhPython or otherwise to activate/trigger a component?

I’m looking to use a component (which doesn’t have an input trigger field) with a toggle, so I can use its functionality from a HumanUI interface. Currently, the component only activates from a double-click in the middle.

image

I’ve tried looking in the ghenv / ghdoc functions inside GHpython, but haven’t had any luck being able to access the canvas object or manipulate it.

Have you tried Metahopper? It has a component to expire an object, maybe this could be useful for you.

Thanks for the suggestion.

Just gave it a try, but unfortunately didn’t work. I think the Expire component tells it to expire/recompute, but the double-click is not part of its regular computation

image

Found a solution, used MetaHopper ‘Get Selected Objects’ to reference the object and bring it into GHpython, then able to find the attribute/command on the object that is triggered by the double-click.

@martinsiegrist Thanks for the MetaHopper suggestion, led me to solving this

1 Like