<?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 Override Save command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557284#M40810</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Because a lot of our users are still on AutoCAD 2010, I have the requirement to be able to always save the drawings that are being worked on in 2015 down to 2010. &amp;nbsp;I want to make AutoCAD always save down to 2010 when using my .NET app. &amp;nbsp;I searched but could not find anything on exactly how you would accomplish that. &amp;nbsp;I can't just put a button on my form for user to push as I cannot be certain that they won't press the AutoCAD save instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2015 17:35:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-25T17:35:27Z</dc:date>
    <item>
      <title>Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557284#M40810</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Because a lot of our users are still on AutoCAD 2010, I have the requirement to be able to always save the drawings that are being worked on in 2015 down to 2010. &amp;nbsp;I want to make AutoCAD always save down to 2010 when using my .NET app. &amp;nbsp;I searched but could not find anything on exactly how you would accomplish that. &amp;nbsp;I can't just put a button on my form for user to push as I cannot be certain that they won't press the AutoCAD save instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2015 17:35:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557284#M40810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-25T17:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557320#M40811</link>
      <description>Try the DefaultFormatForSave system variable.  Just trap the save command using an event handler and set the variable before the save begins.  &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Changing-the-default-file-save-format-in-AutoCAD.html" target="_blank"&gt;http://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Changing-the-default-file-save-format-in-AutoCAD.html&lt;/A&gt;</description>
      <pubDate>Wed, 25 Mar 2015 17:58:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557320#M40811</guid>
      <dc:creator>Keith.Brown</dc:creator>
      <dc:date>2015-03-25T17:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557555#M40812</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I cannot seem to find that setvar variable in the list.&amp;nbsp; When i try to type it in, AutoCAD 2015 does not recognize it.&amp;nbsp; Could it be called something else in 2015?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2015 20:34:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557555#M40812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-25T20:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557583#M40813</link>
      <description>&lt;P&gt;It is a environment variable and not a system variable so you will not see it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out this link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blog.jtbworld.com/2005/11/set-environment-variable-using-vbnet.html" target="_self"&gt;http://blog.jtbworld.com/2005/11/set-environment-variable-using-vbnet.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also check out this link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/z46c489x.aspx" target="_self"&gt;https://msdn.microsoft.com/en-us/library/z46c489x.aspx&lt;/A&gt;&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>Wed, 25 Mar 2015 20:57:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557583#M40813</guid>
      <dc:creator>Keith.Brown</dc:creator>
      <dc:date>2015-03-25T20:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557680#M40814</link>
      <description>&lt;P&gt;I tried to make the environment variable idea work, but for some reason it is not reading it when it attempts to save.&amp;nbsp; Instead I am just going to wrap &lt;FONT color="#000000"&gt;the save command into a function I have, but when I do a &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;acCurdb.SaveAs(acCurdb.Filename,&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;DwgVersion&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.AC1024)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#000000"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;I get an error of eFileSharingViolation.&amp;nbsp; I am guessing because I am trying to do a saveas over the existing drawing.&amp;nbsp; If I cannot do a saveas over the existing drawing, how can I save the current drawing to 2010 format without renaming it as an alternate name.&amp;nbsp; That just won't work if I have to name the filename something else.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#000000"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;Thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2015 22:00:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5557680#M40814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-25T22:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5560884#M40815</link>
      <description>&lt;P&gt;Any ideas on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 15:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5560884#M40815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-27T15:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5560925#M40816</link>
      <description>&lt;P&gt;Try saving the document instead of the database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a link to some code that does just that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=42016.0" target="_self"&gt;http://www.theswamp.org/index.php?topic=42016.0 &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p.s. &amp;nbsp;a simple google search of&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;autocad .net save database&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;turned up this answer.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 16:04:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5560925#M40816</guid>
      <dc:creator>Keith.Brown</dc:creator>
      <dc:date>2015-03-27T16:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5563479#M40817</link>
      <description>&lt;P&gt;I am just finding that it does not help with the fact that I have to save the current document in a lower version. &amp;nbsp;See my code below to see what I am trying to do. &amp;nbsp;For the time being, all drawing files must be saved down to acad2010, and I cannot rely on the users to save down to 2010 on each exit... I am lucky to get them to save it period. &amp;nbsp;It causes massive problems specifically in the batch processing I run in acad2010 routines. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I am trying to save down to 2010 through the document as you had suggested, and there is a function for doc.formatforsave, but I cannot find any help or details on this anywhere. &amp;nbsp;Could you please take a look at my code below and suggest what I should do to make it save down to 2010?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim acdoc As Document = Application.DocumentManager.MdiActiveDocument&lt;/P&gt;&lt;P&gt;Dim acCurdb As Database = acdoc.Database&lt;/P&gt;&lt;P&gt;Dim ed As Editor = acdoc.Editor&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Using acdoc.LockDocument()&lt;BR /&gt;Dim acadDoc As Object = acdoc.&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;FormatForSave()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;acadDoc.Save()&lt;BR /&gt;end using&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 15:34:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5563479#M40817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-30T15:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5563544#M40818</link>
      <description>&lt;P&gt;Or could we use&lt;/P&gt;&lt;P&gt;Autodesk.AutoCAD.ApplicationServices.DocumentSaveFormat()?&amp;nbsp; Not sure which way makes the most sense.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 16:10:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5563544#M40818</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-30T16:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Override Save command</title>
      <link>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5564168#M40819</link>
      <description>&lt;P&gt;Is there a reason you don't just do it this way..?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;CommandMethod("CustomSave")&amp;gt; _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sub CSave()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim CurDWG As Database = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurDWG.SaveAs(CurDWG.Filename, True, DwgVersion.AC1024, CurDWG.SecurityParameters)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&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;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just curious..&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;dwgversion list can be found here:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://forums.autodesk.com/t5/net/how-to-determine-the-version-of-autocad-dwg-file-using-vb-net/td-p/4829615"&gt;http://forums.autodesk.com/t5/net/how-to-determine-the-version-of-autocad-dwg-file-using-vb-net/td-p/4829615&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 21:15:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/override-save-command/m-p/5564168#M40819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-30T21:15:24Z</dc:date>
    </item>
  </channel>
</rss>

