I am using the following code to open Grasshopper documents one after the other:
var io = new GH_DocumentIO();
io.Open(ghFile);
GH_Document ghDoc = io.Document;
ghDoc.Enabled = true;
ghDoc.NewSolution(expireAllObjects: true, mode: GH_SolutionMode.Silent);
return ghDoc;
For the 1st document loaded, when querying the components and their input/output parameters, I can get their data normally. For subsequent opened documents, these are all empty. What could I be missing?