I appologize for the late reply. I have been on another project and have not had time to work on this. I never thought of launching a rule from a form. That seems like an effecient way to solve the problem. I will see what I can do to modify my existing code. I am thinking that only way to do this would be through check boxes in a form (attached). The main problem here being that a parameter would be required for each sheet, and the number of parameters would vary. This would mean a loop to remove all "sheet_#" boolean parameters would have to run, and then a loop to add back the new ones. Then the main problem would be coming up with code to update the form with the added/removed parameters. I am not sure if the later is even possible 😞

Here is my existing code, which is fairly basic but requires a lot of error handling and redirecting in order to be user friendly...
Dim oPath As String
oPath = ThisDoc.Path
Dim oFileName As String
oFileName = ThisDoc.FileName(False)
Dim oForProduction As String
oForProduction = oPath & ("\_FOR PRODUCTION") 'PDF TARGET PATH
Dim oPurchaseParts As String
oPurchaseParts = oPath & ("\_PURCHASE PARTS") 'DXF TARGET PATH
Dim PDFAddIn As TranslatorAddIn
oPDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
Dim DXFAddIn As TranslatorAddIn
oDXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
Dim oPDFName As String
oPDFName = "\" & oFileName & (" ") & Left(DateString,2) & "." & Mid(DateString,4,2) & "." & Right(DateString,2) & ".pdf"
Dim oDXFName As String
oDXFName = "\" & oFileName & (" ") & Left(DateString,2) & "." & Mid(DateString,4,2) & "." & Right(DateString,2) & ".dxf"
Dim MyArrayList As New ArrayList
For Each s In ThisDoc.Document.Sheets
MyArrayList.Add(s.Name)
Next
MultiValue.List("dxf_out") = MyArrayList
If oFileName IsNot "" Then
'[ _.PDF_
PDF_Start:
oPDFExport = MessageBox.Show("Export " & oFileName & " to .pdf?", "Export To PDF", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
If oPDFExport = vbYes Then
If oPDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then
oOptions.Value("All_Color_AS_Black") = 0
oOptions.Value("Remove_Line_Weights") = 0
oOptions.Value("Vector_Resolution") = 400
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
'oOptions.Value("Custom_Begin_Sheet") = 2
'oOptions.Value("Custom_End_Sheet") = 4
End If
If Not System.IO.Directory.Exists(oForProduction) Then
oFolderCreate = MessageBox.Show("Could not locate \_FOR PRODUCTION\ folder in this project." & vbLf & vbLf & "Create folder?", "Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oFolderCreate = vbYes Then
System.IO.Directory.CreateDirectory(oForProduction)
oDataMedium.FileName = oForProduction & oPDFName
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Else
oOverride = MessageBox.Show("\_FOR PRODUCTION\ unavailable." & vbLf & vbLf & "Continue export anyways?", "Confirm Export", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oOverride = vbYes Then
If System.IO.File.Exists(ThisDoc.WorkspacePath() & oPDFName) Then
oFileCheck = MessageBox.Show(ThisDoc.WorkspacePath() & oPDFName & " already exists." & vbLf & vbLf & "Do you want to replace it?", "Confirm Save As", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oFileCheck = vbYes Then
oDataMedium.FileName = ThisDoc.WorkspacePath() & oPDFName
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Else
MessageBox.Show("No .pdf files created." & vbLf & "Returning...", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto PDF_Start
End If
Else
oDataMedium.FileName = ThisDoc.WorkspacePath() & oPDFName
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
End If
Else
MessageBox.Show("No .pdf files created." & vbLf & "Returning...", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto PDF_Start
End If
End If
Else
If System.IO.File.Exists(oForProduction & oPDFName) Then
oFileCheck = MessageBox.Show(oForProduction & oPDFName & " already exists." & vbLf & vbLf & "Do you want to replace it?", "Confirm Save As", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oFileCheck = vbYes Then
oDataMedium.FileName = oForProduction & oPDFName
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Else
MessageBox.Show("No .pdf files created." & vbLf & "Returning...", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto PDF_Start
End If
Else
oDataMedium.FileName = oForProduction & oPDFName
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
End If
End If
ElseIf oPDFExport = vbNo Then
MessageBox.Show("No .pdf files created.", "PDF Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Else
MessageBox.Show("No files created.", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto iLogicEnd
End If
']
'[ _.DXF_
DXF_Start:
oDXFExport = MessageBox.Show("Export " & oFileName & " to .dxf?", "Export To DXF", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If oDXFExport = vbYes Then
If oDXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim oDXFConfig As String
oDXFConfig = "G:\FSH_Engineering\ENGINEERING DRAWINGS\_UTILITY\dxf_export_config.ini"
oOptions.Value("Export_Acad_IniFile") = DXFConfig
End If
If Not System.IO.Directory.Exists(oPurchaseParts) Then
oFolderCreate = MessageBox.Show("Could not locate \_PURCHASE PARTS\ folder in this project." & vbLf & vbLf & "Create folder?", "Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oFolderCreate = vbYes Then
System.IO.Directory.CreateDirectory(oPurchaseParts)
oDataMedium.FileName = oPurchaseParts & oDXFName
oDXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Else
oOverride = MessageBox.Show("\_PURCHASE PARTS\ unavailable." & vbLf & vbLf & "Continue export anyways?", "Confirm Export", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oOverride = vbYes Then
If System.IO.File.Exists(ThisDoc.WorkspacePath() & oDXFName) Then
oFileCheck = MessageBox.Show(ThisDoc.WorkspacePath() & oDXFName & " already exists." & vbLf & vbLf & "Do you want to replace it?", "Confirm Save As", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oFileCheck = vbYes Then
oDataMedium.FileName = ThisDoc.WorkspacePath() & oDXFName
oDXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Else
MessageBox.Show("No .dxf files created." & vbLf & "Returning...", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto DXF_Start
End If
Else
oDataMedium.FileName = ThisDoc.WorkspacePath() & oDXFName
oDXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
End If
Else
MessageBox.Show("No .dxf files created." & vbLf & "Returning...", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto DXF_Start
End If
End If
Else
If System.IO.File.Exists(oPurchaseParts & oDXFName) Then
oFileCheck = MessageBox.Show(oPurchaseParts & oDXFName & " already exists." & vbLf & vbLf & "Do you want to replace it?", "Confirm Save As", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If oFileCheck = vbYes Then
oDataMedium.FileName = oPurchaseParts & oDXFName
Call oDXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
Else
MessageBox.Show("No .dxf files created." & vbLf & "Returning...", "Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Goto DXF_Start
End If
Else
oDataMedium.FileName = oPurchaseParts & oDXFName
Call oDXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
End If
End If
Else
MessageBox.Show("No .dxf files created.", "DXF Export Aborted", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
']
Else
MessageBox.Show("Save drawing before export.", "Failed To Export", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
iLogicEnd: