<?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: Saving drawing in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655143#M66236</link>
    <description>Database.SaveAs()&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;PJONES&gt; wrote in message &lt;BR /&gt;
news:6361064@discussion.autodesk.com...&lt;BR /&gt;
I have searched and cannot find the method to save a drawing.  I saw where I can &lt;BR /&gt;
do a saveandclose but I don't want to do a close.&lt;BR /&gt;
I tried to do a db save but that gives me an error when I run the program.  Any &lt;BR /&gt;
suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Patrick&lt;/PJONES&gt;</description>
    <pubDate>Thu, 25 Mar 2010 20:50:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-03-25T20:50:49Z</dc:date>
    <item>
      <title>Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655142#M66235</link>
      <description>I have searched and cannot find the method to save a drawing.  I saw where I can do a saveandclose but I don't want to do a close.&lt;BR /&gt;
I tried to do a db save but that gives me an error when I run the program.  Any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Patrick</description>
      <pubDate>Thu, 25 Mar 2010 19:46:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655142#M66235</guid>
      <dc:creator>pjones3</dc:creator>
      <dc:date>2010-03-25T19:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655143#M66236</link>
      <description>Database.SaveAs()&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;PJONES&gt; wrote in message &lt;BR /&gt;
news:6361064@discussion.autodesk.com...&lt;BR /&gt;
I have searched and cannot find the method to save a drawing.  I saw where I can &lt;BR /&gt;
do a saveandclose but I don't want to do a close.&lt;BR /&gt;
I tried to do a db save but that gives me an error when I run the program.  Any &lt;BR /&gt;
suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Patrick&lt;/PJONES&gt;</description>
      <pubDate>Thu, 25 Mar 2010 20:50:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655143#M66236</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-25T20:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655144#M66237</link>
      <description>Thanks for the reply.  That gives me the same error - eFileInternalErr.&lt;BR /&gt;
I have:&lt;BR /&gt;
using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
&lt;BR /&gt;
DocumentCollection dm = Application.DocumentManager;&lt;BR /&gt;
Database db = dm.MdiActiveDocument.Database;&lt;BR /&gt;
db.SaveAs();&lt;BR /&gt;
&lt;BR /&gt;
When I build the solution the db.SaveAs() gets a blue squiggly and it says "No overload for method 'SaveAs' takes '0' arguments"&lt;BR /&gt;
If if do db.Save(), I get the same  eFileInternalErr error but no blue squiggly.  I must be missing something but I cannot fathom what.&lt;BR /&gt;
&lt;BR /&gt;
Patrick</description>
      <pubDate>Fri, 26 Mar 2010 11:20:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655144#M66237</guid>
      <dc:creator>pjones3</dc:creator>
      <dc:date>2010-03-26T11:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655145#M66238</link>
      <description>If you want to save to the same file as the current document,&lt;BR /&gt;
then I would suggest using the ActiveX Save() method.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
public void MySave()&lt;BR /&gt;
{&lt;BR /&gt;
    Document doc = Application.....MdiActiveDocument;&lt;BR /&gt;
    object oAcadDoc = doc.AcadDocument;&lt;BR /&gt;
    oAcadDoc.GetType().InvokeMember( "Save",&lt;BR /&gt;
        BindingFlags.InvokeMethod, null, oAcadDoc, null);&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;PJONES&gt; wrote in message &lt;BR /&gt;
news:6361385@discussion.autodesk.com...&lt;BR /&gt;
Thanks for the reply.  That gives me the same error - eFileInternalErr.&lt;BR /&gt;
I have:&lt;BR /&gt;
using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
&lt;BR /&gt;
DocumentCollection dm = Application.DocumentManager;&lt;BR /&gt;
Database db = dm.MdiActiveDocument.Database;&lt;BR /&gt;
db.SaveAs();&lt;BR /&gt;
&lt;BR /&gt;
When I build the solution the db.SaveAs() gets a blue squiggly and it says "No &lt;BR /&gt;
overload for method 'SaveAs' takes '0' arguments"&lt;BR /&gt;
If if do db.Save(), I get the same  eFileInternalErr error but no blue squiggly. &lt;BR /&gt;
I must be missing something but I cannot fathom what.&lt;BR /&gt;
&lt;BR /&gt;
Patrick&lt;/PJONES&gt;</description>
      <pubDate>Fri, 26 Mar 2010 11:29:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655145#M66238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-26T11:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655146#M66239</link>
      <description>Ok, I was being an idiot.  When I searched the forums is was set to the last 90 days.  When I searched all I found where you had told people about this and why it would not work.  Sorry about that.  But now it is giving me a different error:&lt;BR /&gt;
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;BR /&gt;
   at AcDbDatabase.saveAs(AcDbDatabase* , Char* , SecurityParams* )&lt;BR /&gt;
&lt;BR /&gt;
What I am doing is:&lt;BR /&gt;
db.SaveAs("c:\\temp\\temp.dwg", DwgVersion.Current);&lt;BR /&gt;
&lt;BR /&gt;
Patrick</description>
      <pubDate>Fri, 26 Mar 2010 11:50:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655146#M66239</guid>
      <dc:creator>pjones3</dc:creator>
      <dc:date>2010-03-26T11:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655147#M66240</link>
      <description>Thanks for the reply.  This is really frustrating.  Everything I try seems to end in error.&lt;BR /&gt;
I decided to go with doc.SendStringToExecute but it is still giving me fits.  Actually, C# is being the pain.&lt;BR /&gt;
Do you know of a way to make things not threaded or at least execute in order?  My program basically opens the drawing, plots the drawing, then opens the next one in the queue.  The problem starts with when it opens the next one, AutoCAD asks if I want to save the previous drawing.  If I could find a way for AutoCAD to not ask that question, my problems would go away.  However, that problem has plagued me since AutoCAD R14 and I have gotten around it by saving the drawing, opening a blank drawing, then opening the next one.  Now it seems that AutoCAD is opening the next one before the SendStringToExecute gets a chance to execute.&lt;BR /&gt;
&lt;BR /&gt;
Patrick</description>
      <pubDate>Fri, 26 Mar 2010 13:55:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655147#M66240</guid>
      <dc:creator>pjones3</dc:creator>
      <dc:date>2010-03-26T13:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Saving drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655148#M66241</link>
      <description>Thanks for all your help.  I think I have this issue solved.  I decided to switch out of SDI and just use the discard and close method.  It seems to work.  Now onto my other issues &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Patrick</description>
      <pubDate>Mon, 29 Mar 2010 13:44:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/saving-drawing/m-p/2655148#M66241</guid>
      <dc:creator>pjones3</dc:creator>
      <dc:date>2010-03-29T13:44:08Z</dc:date>
    </item>
  </channel>
</rss>

