FileObj.Write() overloads in Rhino 6

Hello everyone,

I am trying to batch export mesh data to individual object files. I’m iterating through a list of Mesh objects, and attempting to export using the Rhino.FileIO.FileObj.Write() method outlined here using the second overloaded method.
I have tried this in c# and in Python with no success using:
Rhino.FileIO.FileObj.Write(path, mesh, wo);
and
Rhino.FileIO.FileObj.Write.Overloads[System.String, Rhino.Geometry.Mesh, Rhino.FileIO.FileObjWriteOptions](path, mesh, wo)
Respectively.
Looking in the Rhino Python Editor at the FileObj.Write() method, the first and second overloads seem to be missing. Is this a known issue with Rhino 6 or am I missing something?

Hi @levib1,

This sample seems to work:

import os
import Rhino

plane = Rhino.Geometry.Plane.WorldXY
sphere = Rhino.Geometry.Sphere(plane, 5.0)
mesh = Rhino.Geometry.Mesh.CreateQuadSphere(sphere, 3)

desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop')
path = os.path.join(desktop, 'test.3dm')

model = Rhino.FileIO.File3dm()
model.Objects.AddMesh(mesh)
model.Write(path, 0)

If you have code that does not work, feel free to post it here.

– Dale