The below shows how to access the list of GH geometry in the solver routine. Is there any example for Tree access with different data types (Integer Data Tree, String Data Tree)
protected override void SolveInstance(Kernel.IGH_DataAccess DA)
{
//Declare a new List(Of T) to hold your data.
//This list must exist and should probably be empty.
List<IGH_GeometricGoo> geometry = new List<IGH_GeometricGoo>();
Int32 count = 0;
//Retrieve the whole list using Da.GetDataList().
if ((!DA.GetDataList(0, geometry)))
return;
if ((!DA.GetData(1, count)))
return;
You will want to use GH_Structure<GH_String> as the type or the corresponding type.
GH_Structure<GH_String> text = new GH_Structure<GH_String>();
if ((!DA.GetDataTree(0, text)))
return;
text.get_Branch(0)[0].Value
//to get the first item in the first branch.