<?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 Re: Missing geometry when saving to DXF format below 2018 in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8011362#M25947</link>
    <description>&lt;P&gt;I apologize. I perform the&amp;nbsp; same action in two different DLLs, one uses the COM API and the other uses the .NET API. Nevertheless, the results are the same. If I save a file out to a 2018 DXF format, the file is fine regardless of which API I use or whether I'm using AutoCAD Mechanical 2018 or vanilla AutoCAD 2018. If I save a file out to any earlier DXF format (2013 in this case), I get a good file if I use vanilla AutoCAD and either API. In AutoCAD Mechanical, I get a file missing geometry using either API and saving to an earlier version of DXF (again 2013 in my examples).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.Net API code:&lt;/P&gt;&lt;P&gt;Dim CAMDirectory As String = "C:\Temp\"&lt;/P&gt;&lt;P&gt;Dim NewFileName As String = "TestDwg.dxf"&lt;/P&gt;&lt;P&gt;Dim CurrentDocument As Document&lt;/P&gt;&lt;P&gt;CurrentDocument = Application.DocumentManager.MdiActiveDocument&lt;/P&gt;&lt;P&gt;CurrentDocument.Database.DxfOut(CAMDirectory &amp;amp; NewFileName, 16, DwgVersion.AC1027)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COM API code:&lt;/P&gt;&lt;P&gt;Dim AcadApp As AcadApplication&lt;/P&gt;&lt;P&gt;Dim AcadAppType As System.Type&lt;/P&gt;&lt;P&gt;Dim AcadDoc As AcadDocument&lt;/P&gt;&lt;P&gt;Dim CAMDirectory As String = "C:\Temp\"&lt;/P&gt;&lt;P&gt;Dim NewFileName As String = "TestDwg.dxf"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;BR /&gt;&amp;nbsp; &amp;nbsp; AcadApp = Marshal.GetActiveObject("AutoCad.Application" &amp;amp; GetMyCurrentACADVersion())&lt;BR /&gt;Catch ex As Exception&lt;BR /&gt;&amp;nbsp; &amp;nbsp; AcadAppType = System.Type.GetTypeFromProgID("AutoCad.Application" &amp;amp; GetMyCurrentACADVersion())&lt;BR /&gt;&amp;nbsp; &amp;nbsp; AcadApp = TryCast(System.Activator.CreateInstance(AcadAppType), AcadApplication)&lt;BR /&gt;End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcadDoc.SaveAs(CAMDirectory &amp;amp; NewFileName, AcSaveAsType.ac2013_dxf)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren Haverstick&lt;/P&gt;&lt;P&gt;Paul Mueller Company&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 May 2018 13:23:16 GMT</pubDate>
    <dc:creator>dhaverstick</dc:creator>
    <dc:date>2018-05-18T13:23:16Z</dc:date>
    <item>
      <title>Missing geometry when saving to DXF format below 2018</title>
      <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8000742#M25943</link>
      <description>&lt;P&gt;My company is using AutoCAD Mechanical 2018 which is built on AutoCAD 2018.1.2 Update. When I save a dwg file to a dxf file using the API (AcadDoc.SaveAs(NewFileName, AcSaveAsType.acXXXX_dxf) and use any version other than 2018, all the model space geometry disappears from the drawing. If I save the same drawing to a dxf file and do it manually inside of AutoCAD, the dxf file is complete. Attached are two examples of what I am talking about.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2013Format-API.dxf - Drawing saved as a 2013 dxf file using the API&lt;/P&gt;&lt;P&gt;2013Format-UI.dxf - Drawing saved as a 2013 dxf file using the AutoCAD user interface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is going on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren Haverstick&lt;/P&gt;&lt;P&gt;Paul Mueller Company&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 16:11:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8000742#M25943</guid>
      <dc:creator>dhaverstick</dc:creator>
      <dc:date>2018-05-14T16:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Missing geometry when saving to DXF format below 2018</title>
      <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8007813#M25944</link>
      <description>&lt;P&gt;Can you please tell if the behavior is on AutoCAD plain vanilla too ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly give us simple API code for us to investigate. I believe you are using COM API.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 06:35:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8007813#M25944</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2018-05-17T06:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Missing geometry when saving to DXF format below 2018</title>
      <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8008671#M25945</link>
      <description>&lt;P&gt;I am using the .Net API and the code I'm using is as follows:&amp;nbsp;AcadDoc.SaveAs(CAMDirectory &amp;amp; NewFileName, AcSaveAsType.ac2013_dxf)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached are two more drawing files. One was created through the API in vanilla AutoCAD 2018 and the other was created through the API in AutoCAD Mechanical 2018. The drawing created in vanilla AutoCAD is okay. The other one is missing geometry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren Haverstick&lt;/P&gt;&lt;P&gt;Paul Mueller Company&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 12:20:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8008671#M25945</guid>
      <dc:creator>dhaverstick</dc:creator>
      <dc:date>2018-05-17T12:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Missing geometry when saving to DXF format below 2018</title>
      <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8010413#M25946</link>
      <description>&lt;P&gt;You're not using the .NET API.&amp;nbsp; You are using the COM API. Showing a single statement without code that shows what 'AcadDoc' is declared as doesn't cut it. If you want help you need to provide more complete information because others aren't going to venture to guess what objects your code is using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/55431"&gt;@dhaverstick&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;I am using the .Net API and the code I'm using is as follows:&amp;nbsp;AcadDoc.SaveAs(CAMDirectory &amp;amp; NewFileName, AcSaveAsType.ac2013_dxf)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached are two more drawing files. One was created through the API in vanilla AutoCAD 2018 and the other was created through the API in AutoCAD Mechanical 2018. The drawing created in vanilla AutoCAD is okay. The other one is missing geometry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren Haverstick&lt;/P&gt;&lt;P&gt;Paul Mueller Company&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 03:49:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8010413#M25946</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-05-18T03:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Missing geometry when saving to DXF format below 2018</title>
      <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8011362#M25947</link>
      <description>&lt;P&gt;I apologize. I perform the&amp;nbsp; same action in two different DLLs, one uses the COM API and the other uses the .NET API. Nevertheless, the results are the same. If I save a file out to a 2018 DXF format, the file is fine regardless of which API I use or whether I'm using AutoCAD Mechanical 2018 or vanilla AutoCAD 2018. If I save a file out to any earlier DXF format (2013 in this case), I get a good file if I use vanilla AutoCAD and either API. In AutoCAD Mechanical, I get a file missing geometry using either API and saving to an earlier version of DXF (again 2013 in my examples).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.Net API code:&lt;/P&gt;&lt;P&gt;Dim CAMDirectory As String = "C:\Temp\"&lt;/P&gt;&lt;P&gt;Dim NewFileName As String = "TestDwg.dxf"&lt;/P&gt;&lt;P&gt;Dim CurrentDocument As Document&lt;/P&gt;&lt;P&gt;CurrentDocument = Application.DocumentManager.MdiActiveDocument&lt;/P&gt;&lt;P&gt;CurrentDocument.Database.DxfOut(CAMDirectory &amp;amp; NewFileName, 16, DwgVersion.AC1027)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COM API code:&lt;/P&gt;&lt;P&gt;Dim AcadApp As AcadApplication&lt;/P&gt;&lt;P&gt;Dim AcadAppType As System.Type&lt;/P&gt;&lt;P&gt;Dim AcadDoc As AcadDocument&lt;/P&gt;&lt;P&gt;Dim CAMDirectory As String = "C:\Temp\"&lt;/P&gt;&lt;P&gt;Dim NewFileName As String = "TestDwg.dxf"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;BR /&gt;&amp;nbsp; &amp;nbsp; AcadApp = Marshal.GetActiveObject("AutoCad.Application" &amp;amp; GetMyCurrentACADVersion())&lt;BR /&gt;Catch ex As Exception&lt;BR /&gt;&amp;nbsp; &amp;nbsp; AcadAppType = System.Type.GetTypeFromProgID("AutoCad.Application" &amp;amp; GetMyCurrentACADVersion())&lt;BR /&gt;&amp;nbsp; &amp;nbsp; AcadApp = TryCast(System.Activator.CreateInstance(AcadAppType), AcadApplication)&lt;BR /&gt;End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcadDoc.SaveAs(CAMDirectory &amp;amp; NewFileName, AcSaveAsType.ac2013_dxf)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren Haverstick&lt;/P&gt;&lt;P&gt;Paul Mueller Company&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 13:23:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8011362#M25947</guid>
      <dc:creator>dhaverstick</dc:creator>
      <dc:date>2018-05-18T13:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Missing geometry when saving to DXF format below 2018</title>
      <link>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8011828#M25948</link>
      <description>I wonder if the missing geometry is proxies when saved to DXF from base AutoCAD and is not proxies when saved from AutoCAD Mechanical, and AutoCAD Mechanical doesn't support saving it's geometry to older format dxf.  If the geometry is being saved as proxies in the dxf file from base AutoCAD, that would explain why it is not missing - a proxy is just a wrapper and AutoCAD saves it without knowing or caring about what is wrapped.</description>
      <pubDate>Fri, 18 May 2018 16:01:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/missing-geometry-when-saving-to-dxf-format-below-2018/m-p/8011828#M25948</guid>
      <dc:creator>artc2</dc:creator>
      <dc:date>2018-05-18T16:01:48Z</dc:date>
    </item>
  </channel>
</rss>

