Loading a Grasshopper document with the GH_DocumentIO.Open method does not call any component Read methods. Is this intended? Makes some components useless as they are reliant on persistent data stored via Write.
The alternative of calling Read myself on every component could work, although I am not sure what to call it with since it takes an instance of the GH_IReader interface which Grasshopper normally creates itself.
Hi @kike,
Maybe you misunderstood the topic. I don’t mean that Read is not called when opening the document in Grasshopper interactively. I am using Rhino.Inside to run Rhino and Grasshopper in headless mode to open a document using GH_DocumentIO.Open.
In case you didn’t misunderstand, I could share a .gh file but the components are in a custom plugin which you would have to download.
False alarm. There was some issue with the assembly referencing and the Read method was not found by the caller without any exceptions.
I noticed that when I tried to place my own call to Read somewhere and kept getting a MethodNotFoundException. I changed some CopyLocal values for referenced assemblies and now it works properly.