Hi @bengee5454
In the past I have just sent everyone R12 files, that way anything can open them, but you could create multiple *.ini files and then use something like this example to select which DXF version you'd like to export.
Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Imports System.Windows.Forms
' Define folder browse dialog
Dim Dialog = New FolderBrowserDialog()
' Set options for folder browser dialog
Dialog.SelectedPath = ThisDoc.Path
Dialog.ShowNewFolderButton = True
Dialog.Description = "Choose Folder"
' Show dialog box
If DialogResult.OK = Dialog.ShowDialog() Then
oPath = Dialog.SelectedPath & "\"
Else
Return 'exit
End If
Dim DXF_Versions = New String(){"R12", "2010", "2018"}
oDXFVersion = InputListBox("Select a DXF Options", DXF_Versions, DXF_Versions(0), Title := "DXF Versions", ListName := "List")
Dim strIniFile As String
'use the selected value to get the correct .ini file
'where there are multiple *.ini files previously setup, such as:
' "C:\temp\dxfout_R12.ini"
' "C:\temp\dxfout_2010.ini"
' "C:\temp\dxfout_2018.ini"
strIniFile = "C:\temp\dxfout_" & oDXFVersion & ".ini"
' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If
'Set the destination file name
oDataMedium.FileName = oPath & ThisDoc.FileName(False) & ".dxf"
'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
