<?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: CloseAndSave()method not saving the file in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572918#M5396</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thank you so much for quick reply, As you mentioned I have used SaveAs also it is working fine. But I need to know how to use&amp;nbsp;&lt;A href="https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_ApplicationServices_DocumentExtension_CloseAndSave_this_Document_string" target="_blank" rel="noopener"&gt;SaveAndClose() Method&lt;/A&gt;&amp;nbsp;so that I get an additional information.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2024 07:20:43 GMT</pubDate>
    <dc:creator>Mohamed_Arshad</dc:creator>
    <dc:date>2024-02-21T07:20:43Z</dc:date>
    <item>
      <title>CloseAndSave()method not saving the file</title>
      <link>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572877#M5394</link>
      <description>&lt;P&gt;Hi Guys!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; I need to save the opened document, I use&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_ApplicationServices_DocumentExtension_CloseAndSave_this_Document_string" target="_blank" rel="noopener"&gt;CloseAndSave()&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;method but it not saving the file. Can anyone explain me how the above method works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@Norman_Yuan&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 06:57:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572877#M5394</guid>
      <dc:creator>Mohamed_Arshad</dc:creator>
      <dc:date>2024-02-21T06:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: CloseAndSave()method not saving the file</title>
      <link>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572894#M5395</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You could use &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_Database_SaveAs_string_DwgVersion" target="_blank" rel="noopener"&gt;Database.SaveAs&lt;/A&gt; before closing the document.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 07:07:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572894#M5395</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2024-02-21T07:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: CloseAndSave()method not saving the file</title>
      <link>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572918#M5396</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thank you so much for quick reply, As you mentioned I have used SaveAs also it is working fine. But I need to know how to use&amp;nbsp;&lt;A href="https://help.autodesk.com/view/OARX/2022/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_ApplicationServices_DocumentExtension_CloseAndSave_this_Document_string" target="_blank" rel="noopener"&gt;SaveAndClose() Method&lt;/A&gt;&amp;nbsp;so that I get an additional information.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 07:20:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572918#M5396</guid>
      <dc:creator>Mohamed_Arshad</dc:creator>
      <dc:date>2024-02-21T07:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: CloseAndSave()method not saving the file</title>
      <link>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572945#M5397</link>
      <description>&lt;P&gt;I cannot help you further without seeing any code and having some information on the context this is run.&lt;/P&gt;
&lt;P&gt;This minimalist test command works as expected:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;[CommandMethod("Test", CommandFlags.Session)]
public static void Test()
{
    var doc = Application.DocumentManager.MdiActiveDocument;
    doc.CloseAndSave(@"F:\Drawings\Test.dwg");
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 07:40:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572945#M5397</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2024-02-21T07:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: CloseAndSave()method not saving the file</title>
      <link>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572962#M5398</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I forget to Change the Command Flags, Now its working fine. Thank you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 07:50:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/closeandsave-method-not-saving-the-file/m-p/12572962#M5398</guid>
      <dc:creator>Mohamed_Arshad</dc:creator>
      <dc:date>2024-02-21T07:50:19Z</dc:date>
    </item>
  </channel>
</rss>

