Grasshopper.resource load error - Loading .GHX as GH_document without running Rhino

Hi there,

I am attempting to do a full execution of Grasshopper definition programmatically without an instance of Rhino and encountered the error loading of Grasshopper.resource.

This happens during the two following attempts:

var definition = new GH_Document()
if (!archive.ExtractObject(definition, "Definition"))
    throw new Exception();
archive.ExtractObject("definition")
var docServer = Grasshopper.Instances.DocumentServer;
var ghDoc = docServer.AddDocument(fileName, true);

image

I believe this has to do with the internal resources tied to an instance of Rhino.
Is there a way to load this ?

You can use GH_IO.dll without anything else, but Grasshopper certainly won’t run without Rhino.