Hi
There are quite a few samples of code available to this.
What you need to do is create an ".ini" file which will have all the settings needed to export the drawing as a dwg file.
When you export your drawings you have the opportunity to save the configuration.
EG.

When that is done, you can reference the .ini file in the iLogic code.
In my example it has a strange name, but I never got around to renaming the file.
Anyway, see my code below, it saves to a different directory (data\"1 Export") and also attaches the revision number to the filename.
'Date: 26.09.2016
'Author: Reg Hasell
' Version 1.0
'
'It will Do a very basic check to see if the file already exists, (I did not want to slow the process down too much
'It will then Create a DWG file in the export directory.
'The major benefit is that it will also add the current Revision to the filename.
' Future development will also update the filename with a prompted date.
Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument
Dim DWGAddIn As TranslatorAddIn
DWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMediumDWG As DataMedium
oDataMediumDWG = ThisApplication.TransientObjects.CreateDataMedium
'---
oPath = ThisDoc.Path
oFileName = ThisDoc.FileName(False) 'without extension
oRevNum = iProperties.Value("Project", "Revision Number")
oDocument = ThisApplication.ActiveDocument
'oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
Dim strIniFile As String
strIniFile = "d:\data\2016-acadexport-[jun16]-2.ini"
oOptions.Value("Export_Acad_IniFile") = strIniFile
oFolder ="d:\data\1 EXPORT"
oDataMediumDWG.FileName =oFolder + "\" + oFileName & "[" & oRevNum & "]" & ".dwg"
If System.IO.File.Exists(oDataMediumDWG.FileName) Then
oChoice=MessageBox.Show(oDataMediumDWG.FileName & " Already Exists - Overwrite?", "Title", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If oChoice=7
'MessageBox.Show("exit", "Title")
Return
Else
'MessageBox.Show("Overwrite", "Title")
End If
End If
'''--- Publish document.
DWGAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMediumDWG)
Beep
MessageBox.Show("Done!", "Title")
edit:
I added this screen as well, just in-case.
Reg
2026.1