The first signature writes the contents of this database object to the file with a given filename. The second signature writes the content to the specified stream buffer.
Using the fileType parameter you can set the type of the file to be written:
OdDb::kDwg — .dwg file
OdDb::kDxf — .dxf file
OdDb::kDxb — binary .dxf file
If you are saving a database to a .dwg file, you can set the specific file version using the fileVersion parameter of the method. The list of possible formats is defined by the OdDb::DwgVersion enumeration.
For example, to save the database in a .dwg file of the 2010 version, with the "drawing.dwg" name: