Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
BWMcDowell
458 Views, 1 Reply

save copy as idw to dwg yielding zip file

on 9-2-15 my ilogic code:

Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 20737 StartFragment: 314 EndFragment: 20705 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet

' Set a reference to the DWG translator add-in. 
Dim oDWGAddIn As TranslatorAddIn 
Dim i As Long 
For i = 1 To ThisApplication.ApplicationAddIns.count 
    If ThisApplication.ApplicationAddIns.Item(i). _ 
    ClassIdString = _ 
    "{C24E3AC2-122E-11D5-8E91-0010B541CD80}" Then 
        oDWGAddIn = ThisApplication. _ 
                  ApplicationAddIns.Item(i) 
        Exit For 
    End If 
Next 
    
' Check to make sure the add-in is activated. 
If Not oDWGAddIn.Activated Then 
    oDWGAddIn.Activate 
End If 
    
' Create a name-value map to supply information to the translator. 
Dim oNameValueMap As NameValueMap = ThisApplication. _ 
    TransientObjects.CreateNameValueMap 

Dim strIniFile As String = "O:\Templates\INVENTOR\EXPORT TEMPLATES\" & iProperties.Value("CUSTOM", "INI FILE")

' Create the name-value that specifies the ini file to use. 
Call oNameValueMap.Add _ 
    ("Export_Acad_IniFile", strIniFile) 

' Create a translation context and define ' that we want to output to a file. 
Dim oContext As TranslationContext = ThisApplication.TransientObjects. _ 
    CreateTranslationContext 
oContext.Type = kFileBrowseIOMechanism 
    
    
    If Not System.IO.DIRECTORY.Exists(iProperties.Value("CUSTOM", "DWG PATH")) Then
    System.IO.DIRECTORY.CREATEDIRECTORY(iProperties.Value("CUSTOM", "DWG PATH"))
    End If
    
         
' Define the type of output by specifying the filename. 
Dim oOutputFile As DataMedium = ThisApplication. _ 
    TransientObjects.CreateDataMedium 
    oOutputFile.FileName = iProperties.Value("CUSTOM", "DWG PATH") & iProperties.Value("CUSTOM", "DWG FILE")
    
    If System.IO.FILE.Exists(iProperties.Value("CUSTOM", "DWG PATH") & iProperties.Value("CUSTOM", "DWG FILE")) Then
    System.IO.FILE.DELETE(iProperties.Value("CUSTOM", "DWG PATH") & iProperties.Value("CUSTOM", "DWG FILE"))
    End If
   
    
' Call the SaveCopyAs method of the add-in. 
Call oDWGAddIn.SaveCopyAs _ 
    (ThisApplication.ActiveDocument, _ 
          oContext, _ 
          oNameValueMap, _ 
          oOutputFile) 

 

saved a copy of my file to a specific sub folder as DWG

on 9-3-15 it saved it inside a zip file

 

I had already followed cathy's advice on editing the registry found here:

http://forums.autodesk.com/t5/inventor-general-discussion/save-copy-as-acad-dwg-zip-file/td-p/223026...

 

any advice to fix this now?