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

save copy as idw to dwg yielding zip file

BWMcDowell
Enthusiast

save copy as idw to dwg yielding zip file

BWMcDowell
Enthusiast
Enthusiast

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?

0 Likes
Reply
458 Views
1 Reply
Reply (1)

BWMcDowell
Enthusiast
Enthusiast

mine did that suddenly recently starting last month

the work around is manually export first

it was caused by my network drives not connecting properly

when I opened a file in autocad here were red x's on network drives

changed a few things to get it to work again :

 

disabled power saver on my nic

disabled intel pro service

changed group policy to wait until network has initialized

set autocad services to delayed start

 

hope this helps

0 Likes