I was looking at the rhinoCommon sdk for a solution but unable to find it.
Here is what I need to do :
From grasshopper component make a document fill it with geometry data
and write it to disk .
I was used to the OpenNurbs c++ where there was a ON_Model to achieve this.
Check out the Rhino.File.IO namespace, specifically, the File3dm class.
if you component is VB Based, the exact code to do that is :
Dim options As New Rhino.FileIO.FileWriteOptions()
A = doc.writefile(path & ".3dm", options)
I am not trying to write the current rhino document
but making a new document fill it and then write to disk.
Thanks, that worked fine,
Another problem I am not able to get the current Rhino Document
Rhino.App has no method to get current document , I have gone trough all sdk files
but did not find anything. I need to read doc properties like units and other stuff