I want to write a single Brep to a .3dm file. The brep is not added to a document. However, I get a “‘f.Created’ threw an exception of type ‘System.ArgumentOutOfRangeException’” error even before I add the Brep. The Brep itself is valid.
Rhino.FileIO.File3dm f = new Rhino.FileIO.File3dm();
f.Objects.AddBrep(FinalBrep);
bool writeResult = f.Write(FilePath, 0);
f.Dispose();
Excuse the german system language, basicly saying “Year/Month/Day DateTime not representable” and “Argument out of bounds” but how could I change that, if that’s the issue?
Thank you @dale, I had my troubles finding a good sample. I wonder why the first code did not work, but I do not recall exactly if I changed more than just the added options. Is “0” not a useable argument for the second parameter of Write()?