Looking for a kind of DISPATCH by Attribute

I am looking for a way to send data off in different directions based on a sorting critera. It feels like there should be a component like this already. Its sort of like Dispatch, but with more than just a binary switching choice. Here’s my diagram of how it would work.

Any ideas?

Hello,

At least two ideas, one with Member Index, the other one with Match Text in the case you have text as the dispatcher.

Explode Tree can give you lists as output if needed.

Dispatcher.gh (16.9 KB)

Yea, I can imagine a number of ways to do it with LOTS of components and steps, I just thought there must be something out there that is designed to do just this in one step. Perhaps not!

Here’s a version in VB where I hard-coded the Sort Keys. I haven’t taken the time to make them inputs, or to cull the nulls, but that would be possible too.


But surely someone must have made one of these!

Merry Christmas !

SmartDispatch

magicteddy.gha (32 KB)
SmartDispatch.gh (8.2 KB)

5 Likes

Wow! Thanks.

That certainly is a VERY smart Dispatch!

Magicteddy,

I am having trouble installing this in GH. Package Manager doesn’t work since it wants to grab it off teh web. I copied the magicteddy.gha file into the AppData/Roaming/Grasshopper/Library folder and I also see it in teh GH File/Special Folders/Components folder, but it still isn’t accessible to me. What am I doing wrong?

Did you right click on the .gha and unblock?

1 Like

The Libraries folder is the correct location, indeed you have to unblock it and restart Rhino.
If it fails to load I think there should be an error message in Rhino command bar.

Success. Thank you!