Exemplo n.º 1
0
        public static void SetEnum2D <T>(this Grasshopper.Kernel.IGH_DataAccess DA, int index, IEnumerable <IEnumerable <T> > data)
        {
            var tree = new DataTree <T>();

            var basePath = DA.ParameterTargetPath(index);

            foreach (var entry in data.Select((o, i) => new { Index = i, Item = o }))
            {
                var path = basePath.AppendElement(entry.Index);

                tree.AddRange(entry.Item, path);
            }

            DA.SetDataTree(index, tree);
        }