Hi Everyone, I’m new with rhino compute and I having trouble, hope you can help with this problem. I’m trying to execute this code from this post Grasshopper within compute.rhino3d - #34 by will
But I have one problem, once it reaches this in rhino Compute “JsonConvert.SerializeObject(obj, GeometryResolver.Settings);” it gives an error with compute that said:
“System.IO.FileNotFoundException: ‘Could not load file or assembly ‘RhinoCommon, Version=7.19.22180.9001, Culture=neutral, PublicKeyToken=552281e97c755530’ or one of its dependencies. The system cannot find the file specified.’”
I already have installed the dependency RhinoCommon with nugget in that version but not sure what it’s given me that error, I let the code that I try to execute below once it try to create new GrasshopperPath(0) it’s go to rhino compute when it generate the problem, I let an attachment of that
Thanks in advance!
class Program
{
static void Main(string[] args)
{
var ghPath = "C:\\Users\\ivan\\source\\repos\\Resthopper\\squared.gh"; //args[0];
GrasshopperDataTree gdt = new GrasshopperDataTree("RH_IN:1");
gdt.Append(new GrasshopperObject(3.0), new GrasshopperPath(0));
var inputs = new List<GrasshopperDataTree>() { gdt };
var result = GrasshopperCompute.EvaluateDefinition(ghPath, inputs);
foreach (var item in result)
{
Console.WriteLine(item.ParamName);
foreach (var path in item.InnerTree.Keys)
{
Console.WriteLine("{0} => [ {1} ]", path, string.Join(", ", item.InnerTree[path].Select(x => x.Data)));
}
}
}
}
}