Read ghdata directly in node


Is it possible to read .ghdata directly from ghpython, c# or vb? Since the data source of the Data Input component is set by right clicking on the node, NodeInCode and ghpythonlib.components does not work. Is it possible to deserialize this data directly? If so, what methods do I need to use to be able to do this?

Best regards
Audun Mathias Øvstebø

Grasshopper (de)serialization is in GH_IO.dll. You have to create an archive, read the file, extract the chunk or fragment and get the data, or something similar.

Thanks, that takes me part of the way to the solution.

I tested the following code for a data output item, but the following error occurred:

import sys
sys.path.append(r'C:\Program Files\Rhino 6\Plug-ins\Grasshopper')

import clr #common language runtime
import GH_IO.Serialization as SER


Runtime error (IOException): file_name is not of a recognized type

line 9, in script

Am I supposed to use a different method to read the file?