Stop List weave when one list runs empty

When using the weave tool to order multiple lists together, Is there a way to stop the output as soon as one list runs out? currently the empty lists are just skipped, and my pastern gets messed up.


I don’t think there’s a component for that, here is a way calculating for each stream the last acceptable index, taking the minimum among all streams, and cutting the final list at that point.

C# would probably be a less component-expensive solution. (10.1 KB)

1 Like

If you right-click on the Weave component and check Insert nulls it put nulls in the output at positions where the correcponding input stream has been depleted.

Then you just have to split the weave output list at the first null to get your desired result.

Edit: forgot to upload file. (9.5 KB)

@magicteddy I’m not sure why, but your solution skips the last 2 items in the list.


1 Like

The request was to stop weaving as soon as one of the streams goes empty, which is what I did.
Your solution stops weaving as soon as a null item should be added, which allows for other non-depleted streams to be used a little more.

The Insert Nulls option is quite nice, I didn’t know that ! :smiley:

Yes you’re right, guess I didn’t read it closely enough.


something like this might also work (11.1 KB)

Cool thanks for the ideas everyone!