I´m trying to create a new list from a flattened data tree of points using C# component
I can flatten the DataTree through “dTPoints.Flatten();” but the method is modifying the original one.
Tried List flatPoints = dTPoints.Flatten(), tried creating an empty list of points to add the flattened points but I´m getting error. 1. Error (CS0029): Cannot implicitly convert type ‘void’ to ‘System.Collections.Generic.List<Rhino.Geometry.Point3d>’
I need a new List. Thank you!
dataTree.AllData works for output (A = dataTree.AllData;). Flatten method doesn´t work here.
I just created a new flattened variable from my data (flattenedDT= new DataTree(dataTree);).
flattenedDT.Flatten works here, but flattenedDT.AllData does not. There is something happening there I don´t know or I´m missing. Anyway, thanks for the help @Tom_P