Hi all,
How do i get the cluster output data from a cluster file.
If i create a new cluster from file the output is empty.
string Path = "None";
DA.GetData(0, ref Path);
GH_Cluster Cluster = new GH_Cluster();
Cluster.CreateFromFilePath(Path);
DA.SetDataTree(0, Cluster.Params.Output[1].VolatileData);
some hints to get the cluster data would be welcome.
I assume when the cluster is not running it can’t compute the data, maybe you will need to run the file in background
string Path = "None";
DA.GetData(0, ref Path);
GH_Cluster Cluster = new GH_Cluster();
Cluster.CreateFromFilePath(Path);
GH_Document doc = new GH_Document();
doc.Enabled = true;
doc.AddObject(Cluster, true, 0);
IGH_Structure data = Cluster.Params.Output[1].VolatileData;
DA.SetDataTree(0, data);
DA.SetData(1, data.GetType());
Yep its working.
Do you know how do i get the Param.Output:Access type (item,list,tree) of the cluster output?..it gives all time item no matter if its a tree or list.