Select predefined branches from a data tree, based on various scenarios

Hallo dear community,
I need a little help

I have for this example a Value List with two different Index (0 and 1) and Data Tree with 6 Branches.

Is there a method when I choose the Scenario with the version 1 (index 0), than would selected only the Branches from 0 to 2 out from the Entwine and when I choose the version 2 (index 1), would be selected the Branches from 2 to 5?

Thanks for the help
Select -Branch.gh (5.0 KB)

I don’t know how to type a list inside the Value List :thinking:

so I would use something like this:


Select -Branch_Re.gh (10.9 KB)

take care that if you want to renumber the branches in such a way they always start from {0} you have to right click Tree Branch and disable “Maintain Paths”, otherwise Version 2 will look like this, starting from {2}

[edit] ohhhh, this is another very smart way from this post:

Select -Branch_Re_Re.gh (9.7 KB)

2 Likes

Grazie Inno, this solve my problem.

Best regards from Munich

1 Like