Open edvinkuric opened 5 months ago
Hey Edvin, just seeing your message now.
Unfortunately I've stopped working on this effort shortly after creating this repo & trying to get any minimal feedback/help from the McNeel discourse forum. I as well tried to buy the Rhino 7 to get back the samples that worked, but as you said that's not possible. TLDR: The Rhino 8 update killed pretty much all I had working :sweat_smile:
I'm glad you found this repo useful, and I'm sorry I can't help you further. I hope you can find a way to get the samples working again. If you do, please let me know, I'd be happy to hear about it.
Hello, i have trouble running any of the provided examples.
I get the following Exception, when using net481: InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'Grasshopper.Plugin.GH_RhinoScriptInterface'.
When using dotnetcore 7, i can't even load the correct DLLs or receive an "Error: HResult E_Fail has been returned from a call to a COM component", which i can't debug further.
Are there any restrictions on using specific versions?
My setup is:
Ideally, i can run Rhino 8 Headless with dotnetcore 7 to be "future-proof", but i hadn't any luck for now. I would also be happy, if i can run any variant for starters, but no Rhino 7 Licenses can be bought anymore.
Can somebody help me with that or provide suggestions? That would be awesome - any hint helpsp
Here is the code, which i used/changed:
Program.cs: (adapted part) ` namespace RhinoGrassHopperRunner { class Program {
`
Resolver.cs:
` using System.Reflection; using System.Runtime.InteropServices;
// Code from https://github.com/mcneel/compute.rhino3d/blob/8.x/src/compute.geometry/Resolver.cs namespace RhinoInside { public class Resolver { ///
/// Set up an assembly resolver to load RhinoCommon and other Rhino
/// assemblies from where Rhino is installed
///
public static void Initialize()
{
Console.WriteLine("Initializing RhinoInside.Resolver");
if (System.IntPtr.Size != 8)
throw new Exception("Only 64 bit applications can use RhinoInside");
AppDomain.CurrentDomain.AssemblyResolve += ResolveForRhinoAssemblies;
}
} ` .csproj:
Thank you very much!! BR, Edvin