I think it could be possible to save model as STL without that dialogbox if you select model before saveas4. Here is example code of it. Hope it helps.
----------------------------------------------------------------------------------------------------------
Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim boolstatus As Boolean Dim ModelName As String Dim ParseParams(1 To 3) As String Dim nErrors As Long Dim nWarnings As Long Sub main()
Set swApp = CreateObject("SldWorks.Application") Set swModel = swApp.ActiveDoc
If swModel Is Nothing Then MsgBox "Try again when you something open!" Exit Sub End If
If swModel.GetType = 3 Then MsgBox "this does not work with drawings!" Exit Sub End If
ModelName = swModel.GetPathName
For p = Len(ModelName) To 1 Step -1 If Mid(ModelName, p, 1) = "\" Then Exit For Next
ParseParams(1) = Left(ModelName, p) ParseParams(2) = Trim(Right(ModelName, (Len(ModelName) - p))) ParseParams(3) = ParseParams(1) & Left(ParseParams(2), (Len(ParseParams(2)) - 7)) & ".stl" swModel.ClearSelection2 True boolstatus = swModel.Extension.SelectByID2(ParseParams(2), "COMPONENT",
0, 0, 0, False, 0, Nothing, 0) boolstatus = swModel.SaveAs4(ParseParams(3), swSaveAsCurrentVersion, swSaveAsOptions_Silent, nErrors, nWarnings) swModel.ClearSelection2 True
End Sub
----------------------------------------------------------------------------------------------------------