The cluster I am running is supposed to just pass the string variable through.
Output variables that are generated without an input works fine, and I am able to collect these, but output variables that are dependent on input remains equal to “None”.
//C#
private void RunScript(string path, int input, ref object A)
{
var cluster = new GH_Cluster();
cluster.CreateFromFilePath(path);
cluster.Params.Input[0].AddVolatileData(new GH_Path(0), 0, input);
var doc = new GH_Document();
doc.Enabled = true;
doc.AddObject(cluster, true, 0);
var structure = cluster.Params.Output[0].VolatileData;
var tree = new DataTree<object>();
tree.MergeStructure(structure, new Grasshopper.Kernel.Parameters.Hints.GH_NullHint());
A = tree;
doc.Enabled = false;
doc.RemoveObject(cluster, false);
doc.Dispose();
doc = null;
}
I’m trying to implement this code into a gh script I have, but the cluster I’m calling has a brep input and brep output. I can’t seem to get the brep get returned from the cluster. Do you have any solutions for this?