DXF Export via macro

DXF Export via macro

Anonymous
Not applicable
1,741 Views
1 Reply
Message 1 of 2

DXF Export via macro

Anonymous
Not applicable

Hello,

 

We create idw files and convert them into dxf files using macro. But on some PCs, exported files are zipped automatically. We dont want them zipped. Why that happens?

 

Thanks in advance

0 Likes
1,742 Views
1 Reply
Reply (1)
Message 2 of 2

alewer
Advocate
Advocate

I'm assuming that you are using the dxf translator addin.  If memory serves:  Have one of the users save a copy as .dxf without the macro.  On the save dialog, select Options, and make sure that the Pack and Go is not selected.  Proceed with save.  This should fix the issue for this user.

 

To prevent this from happening again, it is a good idea for you to create a configuration that the macro will always use.  To do this, save copy as .dxf again without the macro.  Select Options.  Make sure Pack and Go is not selected.  Click Next.  Select other options (scaling, mapping options, etc).  Click "Save Configuration," and save the .ini file to a location on your network that all users can access.

 

Then you'll need to edit your code so that the translator uses the .ini file you've created.  From the programming help (slightly edited):

 

 

   ' Create a NameValueMap object
Dim oOptions As NameValueMap
Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap

Dim strIniFile As String
strIniFile = "(location of .ini file).ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile

'Set the destination file name
oDataMedium.FileName = "c:\tempdwgout.dwg"
'Publish document.
Call DWGAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
0 Likes