I have a component that allows you to select a set of components and stores the reference (IGH_DocumentObject) internally.
To keep this data stored internally (after closing and opening the file) I am serializing them using the InstanceGuid, is there a better way? The problem comes when deserializing, I retrieve the Guids but at that time have not yet created instances or loaded the entire document, I guess. Then I get the object reference error when I try to retrieve instances from the guids.
So, what’s the right way to do this? I have to pick up the guids and wait for the document to finish loading and then retrieve the IGH_DocumentObject from the InstanceGuids? How would I do this? With the Grasshopper.Instances.DocumentServer.DocumentAdded or Grasshopper.Instances.ActiveCanvas.Document.ObjectsAdded or other event?