Hello
I've been using this to export an idw to an Autocad .dwg but don't know how to set an 'Inventor.dwg' option.
The full ilogic program opens, exports, closes then moves to the next file, exporting 'ThisDocument' doesn't work because 'ThisDocument' holds the ilogic code - it's to export the file which has been opened & I can't find a TranslatorAddIn for an .idw (not sure if there is one, why would there be a need to translate an idw) - is it possible to mimic line 2 to Dim DWGAddIn as the open idw?
'''--- Publish document.
Dim DWGAddIn As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")
DWGAddIn.SaveCopyAs(oDoc, oContext, oOptions, oDataMediumDWG)
'MessageBox.Show(newFullFileName, "newFullFileName")
Regards
Andrew
Hi @andrew_canfield . Please try this export method in InventorDWG:
Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim sPath As String = System.IO.Path.GetDirectoryName(oDoc.FullFileName)
Dim sName As String = System.IO.Path.GetFileNameWithoutExtension(oDoc.FullFileName)
If Not System.IO.File.Exists(sPath & "\" & sName & ".dwg") Then
oDoc.SaveAsInventorDWG(sPath & "\" & sName & ".dwg", True)
End if
True = Save off a copy as a DWG, and keeps the current file open.
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
Can't find what you're looking for? Ask the community or share your knowledge.