<?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 Betreff: How to save a file in DXF? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187104#M58856</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I used this&lt;/SPAN&gt; &lt;SPAN&gt;code:&lt;/SPAN&gt;&lt;/SPAN&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        [CommandMethod("DrawingSaved")]
        public static void DrawingSaved()
        {
            Document acDoc = Application.DocumentManager.MdiActiveDocument;

            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.DxfOut(acDoc.Name, 6, Autodesk.AutoCAD.DatabaseServices.DwgVersion.Current);

        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;&lt;SPAN&gt;But it's&lt;/SPAN&gt; &lt;SPAN&gt;giving error&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;﻿&amp;nbsp; Exception was unhandles by user code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eFileAccessErr﻿&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2011 11:58:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-10-11T11:58:48Z</dc:date>
    <item>
      <title>How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187054#M58854</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Please&lt;/SPAN&gt; &lt;SPAN&gt;help!&lt;/SPAN&gt;&lt;/SPAN&gt;﻿&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 11:26:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187054#M58854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-11T11:26:49Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187096#M58855</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is that what you are missing?&lt;/P&gt;&lt;PRE&gt;   &amp;lt;Runtime.CommandMethod("ADESK_saveAsDxf")&amp;gt; _
   Public Shared Sub ADESK_saveAsDxf()
      Dim tFileName As String = "C:\TEMP\myDxfFileName.DXF"
      Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.DxfOut(tFileName, 6, Autodesk.AutoCAD.DatabaseServices.DwgVersion.Current)
   End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 11:50:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187096#M58855</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-10-11T11:50:53Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187104#M58856</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I used this&lt;/SPAN&gt; &lt;SPAN&gt;code:&lt;/SPAN&gt;&lt;/SPAN&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        [CommandMethod("DrawingSaved")]
        public static void DrawingSaved()
        {
            Document acDoc = Application.DocumentManager.MdiActiveDocument;

            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.DxfOut(acDoc.Name, 6, Autodesk.AutoCAD.DatabaseServices.DwgVersion.Current);

        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;&lt;SPAN&gt;But it's&lt;/SPAN&gt; &lt;SPAN&gt;giving error&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;﻿&amp;nbsp; Exception was unhandles by user code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eFileAccessErr﻿&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 11:58:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187104#M58856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-11T11:58:48Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187120#M58857</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you take &lt;EM&gt;&lt;FONT color="#666699"&gt;acDoc.Name&lt;/FONT&gt;&lt;/EM&gt; ﻿as name for your DXF-file you will recognize, that it will have included the extension ".DWG", but if you want to save it as DXF you should have DXF as extension &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   &amp;lt;Runtime.CommandMethod("ADESK_saveAsDxf")&amp;gt; _
   Public Shared Sub ADESK_saveAsDxf()
      Dim tAcadDoc As ApplicationServices.Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
      Dim tFileName As String = tAcadDoc.Name
      If tFileName.ToUpper.EndsWith(".DWG") Then tFileName = Left(tAcadDoc.Name, tAcadDoc.Name.Length - 4) &amp;amp; ".DXF"
      tAcadDoc.Database.DxfOut(tFileName, 6, Autodesk.AutoCAD.DatabaseServices.DwgVersion.Current)
   End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;HTH, - alfred -&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 12:09:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187120#M58857</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-10-11T12:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187208#M58858</link>
      <description>&lt;P&gt;My file was already in the extension. Dxf&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Since yesterday I'm puzzling over it but nothing works &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked using the command line﻿.&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;acadDocument.SetVariable("FILEDIA", 0);﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;acadDocument.SendCommand("SAVE " + FileTxt.FullName + "\nv\n2007\n16\nyes\n");﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;acadDocument.SetVariable("FILEDIA", 1);﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was creating a dll just to save, so it is better not to have to create a dll.﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="almost_half_cell"&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;SPAN&gt;!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;﻿&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 12:59:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187208#M58858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-11T12:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187226#M58859</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; My file was already in the extension. Dxf﻿&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Ok, the more info, the better we can "debug" &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well the DXFOUT-function exports the current drawing, but it is not to compare with SAVEAS, it's more like WBLOCK. And for WBLOCK you know, that if you are working on a drawing AA.DWG you cannot start WBLOCK and export some elements to AA.DWG ==&amp;gt; you have to take another filename.&lt;/P&gt;&lt;P&gt;And same situation is to use for DXFOUT, you cannot use the same name as you already have opened.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 13:24:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187226#M58859</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-10-11T13:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a file in DXF?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187240#M58860</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;That must be what&lt;/SPAN&gt; &lt;SPAN&gt;was&lt;/SPAN&gt; &lt;SPAN&gt;wrong&lt;/SPAN&gt; &lt;SPAN&gt;then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good to know&lt;/SPAN&gt;&lt;SPAN&gt;, I'll&lt;/SPAN&gt; &lt;SPAN&gt;try!&lt;/SPAN&gt;&lt;/SPAN&gt;﻿&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2011 13:21:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-save-a-file-in-dxf/m-p/3187240#M58860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-11T13:21:44Z</dc:date>
    </item>
  </channel>
</rss>

