This is a generic question, I am curious to know a way to get the GH_Archive out of a file that is currently in use and it is not saved, I am aware of GH_Archive.ReadFromFile() and GH_Archive.Deserialize_Binary(), but not sure how to serialise the current GH_Document instance or if that is even the correct question.
Sorry for the late response. Question was due an odd circumstance. I was requested to write a Rhino Plug-In that save and read encrypted grasshopper files without passing through .gh or .ghx. That bullet got dodge for the moment.
But just out of curiosity, is there anyway of getting the binary of a new unsaved file?