Suppressing a dialogue box

I am writing .NET plugin using RhinoCommon. I have a requirement to export the mesh as OBJ with a certain set of options (such as use polygon mesh instead of Nurbs). I am using RhinoDoc.WriteFile function. Is there a way I can programatically determine these options (irrespective of what user might have chosen) and use it ?

I am using these options already

Rhino.FileIO.FileWriteOptions fo = new Rhino.FileIO.FileWriteOptions();
fo.IncludeBitmapTable = true;
fo.SuppressDialogBoxes = true;
fo.WriteGeometryOnly = false;
fo.WriteSelectedObjectsOnly = false;
fo.IncludePreviewImage = true;

to supress all dialog boxes I would recommend to script it.

Example with stl:

Dim ExportStlSettings As String = " _ExportFileAs=_Binary _ExportUnfinishedObjects=_Yes _UseSimpleDialog=_No _UseSimpleParameters=_No _enter _Detailedoptions _Advancedoptions _A 0 _S 0 _D 0.01 _E 0 _G 0 _M 0 _I 0 _enterend"
Dim exportDir As String = IO.Path.Combine(location, filename & ".stl")
RhinoApp.RunScript("_-Export " & Chr(34) & exportDir & Chr(34) & Definitions.ExportStlSettings, True)

Jordy is correct. The best way (and sometimes the only way) to export geometry to a non-Rhino format is to script either the SaveAs or Export commands using the Rhino.RhinoApp.RunScript static function.

Here is some useful information about how to script (or run) commands from a plug-in command.