Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Thanks. It helped to to get around.

My rule as shown below, works fine.

Sub Main()
oExit = MessageBox.Show("EXIT?", "Title", MessageBoxButtons.YesNo)
If oExit = vbYes Then Exit Sub

saveFolderStp = "C:\Roy XX\1551\STP\"
saveFolderIges = "C:\Roy XX\1551\IGES\"

oModelDoc = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
Dim FFN_wExt As String 
FFN_wExt = ThisDrawing.ModelDocument.FullFileName

'specify word splitting characters "space" and "dash"
Dim Separators() As Char = {"\"c, "."c}
Sentence = FFN_wExt
Words = Sentence.Split(Separators)
Dim oWords As New ArrayList
i = 0
For Each wrd In Words
oWords.Add(wrd)
i += 1
Next
oCount = oWords.Count

LFN_woExt = oWords(oCount-2)
LFN_revNumber = iProperties.Value("Project", "Revision Number")
revNumber_Edit = InputBox("REV. NUMBER (EDIT)", "EDIT", LFN_revNumber)
LFN_revNumber = revNumber_Edit
LFN_wRev = LFN_woExt & "-" & LFN_revNumber

Dim optionsSave As New ArrayList
oStp = ".stp"
oIges = ".iges"
oExit = "EXIT"
optionsSave.Add(oStp)
optionsSave.Add(oIges)
optionsSave.Add(oExit)
selectionSave = InputListBox("Prompt", optionsSave, optionsSave(0), Title := "FILE EXPORT", ListName := "List")
If selectionSave = oExit Then Exit Sub
If selectionSave = oSTP Then strFolder = saveFolderStp
If selectionSave = oIgs Then strFolder = saveFolderIges

saveCopyAs(FFN_wExt, strFolder, LFN_wRev, selectionSave)
End Sub


Sub saveCopyAs(FFN_wExt, strFolder, strFile, selectionSave)
'oFile =  ThisApplication.Documents.Open(FFN_wExt, True) 'False/True: open the file is invisibe/visible
'MessageBox.Show("strFolder: " & strFolder, "Title")
'MessageBox.Show("strFile: " & strFile, "Title")

    oDoc = ThisDoc.Document
    xx = selectionSave
	Dim oFileDlg As inventor.FileDialog = Nothing
	Call ThisApplication.CreateFileDialog(oFileDlg)
	oFileDlg.InitialDirectory = strFolder    'ThisDoc.WorkspacePath()
    If xx = ".stp" Then
    oFileDlg.Filter = "STEP Files (*.stp; *.ste; *.step)|*.stp"
'    Else If xx = ".ipt" Then'    oFileDlg.Filter = "Autodesk Inventor Part Files (*.ipt)|*.ipt"'    Else If xx = ".iam" Then'    oFileDlg.Filter = "Autodesk Inventor Assembly Files (*.iam)|*.iam"'    Else If xx = ".idw" Then'    oFileDlg.Filter = "Autodesk Inventor Drawing Files (*.idw)|*.idw"
    Else If xx = ".iges" Then
    oFileDlg.Filter = "IGES Files (*.igs; *.ige; *.iges)|*.iges"
    End If
	
    oFileDlg.DialogTitle = "Save Native"
'    Call oFileDlg.ShowOpen
	
    oFileDlg.FileName = strFolder & strFile		'"C:\Temp\DefaultFileName"	'strFile        'iProperties.Value("Project", "Part Number")
    oFileDlg.CancelError = True
    On Error Resume Next
    oFileDlg.ShowSave()
    If Err.Number <> 0 Then
    MessageBox.Show("No File Saved.", "iLogic: Dialog Canceled")
    ElseIf oFileDlg.FileName <> "" Then
    MyFile = strFolder.FileName        'oFileDlg.FileName
    oDoc.SaveAs(MyFile, True) 'True = Save As Copy & False = Save As
    End If
'oFile.Close 
End Sub