Hi,

I have a question concerning handling DataTrees within the Grasshopper C# Component.

So, I have a given set of planes that is structured as followed:

{0;0}

{0;1}

{0;2}

{0;3}

{1;0}

{1;1}

{1;2}

{1;3}

.

.

.

etc

where each of the branches holds a collection of geometry (so 3 dimensions in total).

I have created a DataTree as well as a 3-dimensional List<> structure for comparison like so:

DataTree < Plane > jointsTree = new DataTree();

List<List<List>> jointsList = new List<List<List>>();

Iâ€™m running into trouble when I try to iterate with for-loops using the datatree.

for example:

Assuming I have 2 joints each with 4 members as illustrated above, If I access the property **jointsList.Count** it returns the value of **2**.

Calling **jointsList[0].Count** returns **4**, which is the number of members of that joint.

However, using the DataTree structure there is no way to get the same counting method. if I call the property **jointsTree .BranchCount**, it returns the value of **8**, which is the total number of members rather than the number of joints.

Calling **jointsTree.Branch(0).Count** returns the length of {0,0}, the number of geometry in that particular branch rather than the number of members, and calling **jointslist[4].Count returns the number of members of {1;0}, which basically means that the tree is somehow collapsed into two levels?

Using joints.Branch(i,j) i can access the data in multiple dimensions, but that assumes I have a way to calculate the max value for i and j â€¦

So, either I am missing something vital (I hope thats the case) or the DataTree structure seems unable to handle multidimensional data.

Thanks in advance for solving this mysteryâ€¦