C# logic fail

Hey,
I have been looking at this for way to long.
The goal is to use a List of Pathadresses to transfer Stuff from one tree into a new tree structure, dictated by the PathList.
I cant spot the reason why I keep runing into Index issues. It seems as if there are certain index numbers that dont work.
Can anyone please help me?
all the best and thank you


c# Indexfails_2025.05.09.gh (9.7 KB)

I think you’re trying to address the paths by their branch number rather than their sequential index.

index   path
0       {0}
1       {2}
2       {4}

I think DataTree.Path() needs the index value (0,1,2) rather than the branch address (0,2,4) so you’ll have to convert one to the other.

c# Indexfixed_2025.05.09.gh (18.6 KB)
Does this do what you want?

Thank you :slight_smile: