FileWriteOptions Suppress Dialog

Thank you @dale, works great!

For anyone else stumbling on this and wanting to add options for the STL export:
With help of this post I added this to Dale’s example:

            var sb = new StringBuilder();
            sb.Append("_ExportFileAs=_Binary ");
            sb.Append("_ExportUnfinishedObjects=_Yes ");
            sb.Append("_UseSimpleDialog=_No "); 
            sb.Append("_UseSimpleParameters=_No ");
            sb.Append("_Enter _DetailedOptions ");
            sb.Append("_JaggedSeams=_No ");
            sb.Append("_PackTextures=_No ");
            sb.Append("_Refine=_Yes ");
            sb.Append("_SimplePlane=_No ");
            sb.Append("_Weld=_No ");
            sb.Append("_AdvancedOptions ");
            sb.Append("_Angle=15 ");
            sb.Append("_AspectRatio=0 ");
            sb.Append("_Distance=0.01 ");
            sb.Append("_Grid=16 ");
            sb.Append("_MaxEdgeLength=0 ");
            sb.Append("_MinEdgeLength=0.0001 ");

            var script = $"_-Export \"{fileName}\" {sb} _Enter _Enter";
            RhinoApp.RunScript(doc.RuntimeSerialNumber, script, false);

Works like a charm (at least for me)!