How to select tree branch data (not using "Stream Filter")

Hi everyone.

I need to select the data to be stored in the tree branch according to the conditions.
I want to create Tree da

ta with the same Tree configuration as “Gate”.

Do I need to use other components? or script?

I understand that “Stream Filter” does not support Tree data.
If I write a script(python), how do I write it?
Please tell me how to write it.

thanks,
Tomoselection_branchDATA.gh (13.4 KB)

selection_branchDATA_RE.gh (13.1 KB)

1 Like

Thank you ! Very simple and smart.

How about in this case? x is not serial number(x= 1,-1,2,-2,3,-3).
I want to match the sign of x with the sign of the vector.
I will attach what I have added.
selection_branchDATA_RE2.gh (18.1 KB)

If(x=1,a,If(x=-1,b,If(x=2,c,If(x=-2,d,If(x=3,e,f)))))

1 Like

Exactly what I need it ! Thanks again.
I just learned that we could write the program in"Expression component" for the first time. Recently, I just started studying Python. Is this the notation of Python??

No. It’s just an expression.