Datatree with different branch types

Hi. Here is an example of what I want to do.
I want to input a PlanktonMesh, and List as one output variable Data, so I store them into a tree.

I cant get the points from the second branch. And how should I get this tree in the second node? Or is there another way to do it?

Many thanks.



You are adding the list of points as one object in the output tree. So the branch {2} contains the “list”, instead of the list content.
Use tree.AddRange(ptList, path2).
You may need to switch the tree type to a GH_Structure instead of DataTree, since you are in VS.

For the second issue, you are not getting the input tree !
That should be DA.GetDataTree(0, out tree).
But, this will require to work with a GH_Structure<IGH_Goo> instead of a DataTree<object>.

1 Like

HI. Thank you for your reply!