Pick elements using ID's

Hi all,

I’m trying to get better at data structure management in Grasshopper, but it’s not going too well so far… Hopefully, one of you can help me with some good workflows!

I’m trying to pick lists of geometry using an assigned ID. I have a list of all the ID’s and a data tree structure of all the geometry sorted into branches with paths corresponding to the correct ID. Ex. ID:A0 is in branch {0}, ID:A1 is {1} and so on.

I’m using the Item Selector from Human UI to select the desired ID’s. However, when using the Tree Branch component, the geometry is merged into the previous data structure {A} and not {A;B}. I would also like to keep the data tree branch path structure, so geometry selected with a A3 ID is located in a {x;3} path.

I have created a data tree with the desired structure I hope to achieve. It might be a simple matter of correct flattening and grafting, I’m not sure…

Thanks in advance!

Pick_geometry_using_ID.gh (9.3 KB)

You can select the “Renumber” option on the RMB popup…


Pick_geometry_using_ID_re.gh (18.6 KB)

Thanks @HS_Kim. I have been playing around with the renumbering function, but do you have an idea how to replace the output paths {0} - {6} with the paths on the desired output? The lines in {0;x} will have one load applied to them while the lines in {1;x} will have another load and so on.


Pick_geometry_using_ID_reV2.gh (22.3 KB)

1 Like

Perfect, thank you! :slight_smile: