<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with opening 3d dxf in Inventor by VBA. Possible bug in dwg/dxf translator in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-with-opening-3d-dxf-in-inventor-by-vba-possible-bug-in/m-p/11858891#M150757</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As in title: How to open 3d dxf in Inventor by VBA?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried different ways, but nothing works well.&lt;/P&gt;&lt;P&gt;If I manage to open somehow, I only get 2d drawing. It's not enough, as I need to capture picture of 3d isometric view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that someone can help me.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Maciej Wojda&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2023 10:18:02 GMT</pubDate>
    <dc:creator>MaciejWojda</dc:creator>
    <dc:date>2023-03-31T10:18:02Z</dc:date>
    <item>
      <title>Problem with opening 3d dxf in Inventor by VBA. Possible bug in dwg/dxf translator</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-with-opening-3d-dxf-in-inventor-by-vba-possible-bug-in/m-p/11858891#M150757</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As in title: How to open 3d dxf in Inventor by VBA?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried different ways, but nothing works well.&lt;/P&gt;&lt;P&gt;If I manage to open somehow, I only get 2d drawing. It's not enough, as I need to capture picture of 3d isometric view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that someone can help me.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Maciej Wojda&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:18:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-with-opening-3d-dxf-in-inventor-by-vba-possible-bug-in/m-p/11858891#M150757</guid>
      <dc:creator>MaciejWojda</dc:creator>
      <dc:date>2023-03-31T10:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to open 3d dxf in Inventor by VBA?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-with-opening-3d-dxf-in-inventor-by-vba-possible-bug-in/m-p/11861991#M150805</link>
      <description>&lt;P&gt;Well, I have such function as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Function ImportDXF(filePath As String) As Document

  Dim DXFAddIn As TranslatorAddIn
  Set DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")

  Dim oContext As TranslationContext
  Set oContext = ThisApplication.TransientObjects.CreateTranslationContext
  oContext.Type = kFileBrowseIOMechanism

  
  Dim oOptions As NameValueMap
  Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap
  oOptions.Value("Import_Acad_IniFile") = dwgImportConfig
  
  Dim oDataMedium As DataMedium
  Set oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
  oDataMedium.MediumType = kFileNameMedium
  oDataMedium.filename = filePath
  
  Dim oDoc As Document
  Call DXFAddIn.Open(oDataMedium, oContext, oOptions, oDoc)
  oDoc.Close (True)
  
  Set ImportDXF = ThisApplication.ActiveDocument

End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When it comes to line 21 that tries to open a file, a message box appears with description such as:&lt;BR /&gt;&lt;EM&gt;You cannot open DWG file. If the file os opened in AutoCAD or another application, close it and try again.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file I try to open is not opened by other software, of course.&lt;/P&gt;&lt;P&gt;After closing the msgbox, run-time error appears: "Method 'Open' of object 'TranslatorAddin' failed"&lt;BR /&gt;&lt;BR /&gt;When I try to make import manually it works, while using the same .ini file.&lt;BR /&gt;&lt;BR /&gt;Does anyone have some idea what's wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same function (with appropriate .ini file) works well for dwg files.&lt;BR /&gt;It looks like some bug in the translator, but maybe I miss something?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maciej Wojda&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 09:53:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-with-opening-3d-dxf-in-inventor-by-vba-possible-bug-in/m-p/11861991#M150805</guid>
      <dc:creator>MaciejWojda</dc:creator>
      <dc:date>2023-03-31T09:53:57Z</dc:date>
    </item>
  </channel>
</rss>

