Convert 'No data was collected' into <empty>

Hi,

Maybe a bit of a strange question:

I would like to generate a mask based on the presence of a data path using the Tree statistics tool.
It work fine, as long as the Tree statistic tool has input data.

However, when there is no input, the Tree statistic tool gives ‘no data was collected’ ánd when inputted in the split tree component, it gives an error → no output out of split tree component present.

What I would like to see is that when there is ‘No data was collected’ in the Split tree data component, NO path are selected (in other words all data is in output N).

I came up with a workaround, see below.

But I got a feeling there has to be a better way…
2021-11-24 Split Tree based also if No data was collected as Mask.gh (15.9 KB)

Any suggestions?

Thanks!

hi,

it makes little sense to create an empty list within grasshopper with a element, which would be needed that the split element passes the input check and leaves the data alone. your solution is already pretty short and proper. in case you wanted it “smaller” you can make some empty iist in c# and add the data to it:
2021-11-24 Split Tree based also if No data was collected as Mask_c#.gh (18.6 KB)

hope that helps

Ben

1 Like

Ahh perfect!!

Thanks👍