Detect 'no data received'

Hey, I have a custom ‘Rhino preview’ component that is supposed to pass received geometry back to my Rhino plug-in. Problem is, that sometimes it doesn’t receive any solution (orange line leading to the component), which means that SolveInstance is not called at all.

I would need to detect such event to pass null back to my plug-in. Is that somehow possible?

I believe this will be really simple for someone more experienced with grasshopper development :sweat_smile:

Could maybe @dan or @JohnM help?

Hi Honza-

Sorry this didn’t get on our radar sooner!

Can you please provide your custom component so that we can reproduce the issue here? I think this would go on @curtisw 's list, but we’d need to reproduce it first.


Hi @dan
To be honest, I am new to GH and struggle a bit with some scripts that I inherited :smiley:

I found out that there are two ‘ways’ how components output ‘empty result’ and only one triggers SolveInstance of the component down the stream.
On the canvas it looks like this:

This is a component that triggers SolveInstance when it doesn’t output anything

This component doesn’t trigger Preview’s SolveInstance

So far I am not really sure how come the later script behaves this way. But maybe this is enough information to point me to some solution? The goal is to only change the Preview component to make it work - if that’s possible

I’m not really sure if this helps, but for instance an empty enumerable will yield the first case, while None will yield the case (when outputting from GHPython):

Thank you, It will help in case there is no way to detect receiving ‘None’ in my component. If that’s the case, now I know what to search for in the script :slight_smile: