DataTree is not working

DataTree is not working … which name space I should use. I am making Grasshopper component SDK in C#.

DataTree tree=new DataTree();

which name space I should use?

Hi tsiddikee
You can use DataTree < Point3d > pt = new DataTree < Point3d > ();Create a point3d tree data,Check the attached filedatetree (10.8 KB)

1 Like

Thanks ! I know this bit. I was asking about the name space.

Which namespace should be containing datatree?

I am writing GH Component from Visual studio dot net as Component SDK

Which name space contain datatree, because my code is not recognising
DataTree .

I am using Grasshopper.Kernel.Data
but it is not recognizing DataTree at all

I wrote many GH component in C# dot net from Visual studio, but some how I did not use DataTree before. So, today when I tried to use it, I am bit shocked, it is not recognized, but all other things are recognized and working perfect.

Solved. I just copied all the name space used in GhScripting component :smiley:

And I have added all references … Now it works.

1 Like