Message 1 of 4
Export pack and go DXF with ilogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to export all sheets of a drawing as DXF's, in a pack and go ZIP file for easy management. I have the ini config file which works with the DWG export, but I cannot get the output to save as a .zip file.
Here is what I am working with.
' Get the DXF translator Add-In. Dim DXFAddIn As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}") 'Set a reference to the active document (the document to be published). Dim oDocument As Document = ThisApplication.ActiveDocument Dim oContext As TranslationContext = ThisApplication.TransientObjects.CreateTranslationContext oContext.Type = kFileBrowseIOMechanism ' Create a NameValueMap object Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap ' Create a DataMedium object Dim oDataMedium As DataMedium = ThisApplication.TransientObjects.CreateDataMedium ' Check whether the translator has 'SaveCopyAs' options If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then Dim strIniFile As String strIniFile = "C:\dxf_export.ini" ' 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 = "c:\temp\dxf.zip" 'Publish document. DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
This code exports all the sheets of a drawing if I change the file name output under "oDataMedium.FileName" to a .dxf extension, and the ini file to USE TRANSMITTAL=No.
I had to change the file extension of the ini file so i could upload it.