<?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: Issue with saveas(sfile) in ObjectARX 2018 in a specific situation in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11976667#M1743</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I mean is that an entity has been&amp;nbsp;PermanentlyErased.Below is the recovery information when open the dwg file:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;图形修复。
图形修复日志。
验证句柄表内的对象。
有效对象 40544  个，无效对象 1      个
对象验证完毕。
    从图形挽回的数据库。
核查表头
核查表
第 1 阶段图元核查
阶段 1 已核查 40500   个对象
第 2 阶段图元核查
阶段 2 已核查 400     个对象AcDbDictionary(60F)
   e21f8fdcb29a405e9aa0d7c85589de ePermanentlyErased    Delete Entry
阶段 2 已核查 40500   个对象
核查块
 已核查 18      个块
正在核查 AcDsRecords
共发现 1 个错误，已修复 1 个
已删除 0 个对象
正在打开 AutoCAD 2018 格式的文件。&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I think the DWG file might be corrupted, but I am unsure if there is any way to check for data issues before or after calling 'saveas'&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 20 May 2023 06:44:13 GMT</pubDate>
    <dc:creator>3453351159</dc:creator>
    <dc:date>2023-05-20T06:44:13Z</dc:date>
    <item>
      <title>Issue with saveas(sfile) in ObjectARX 2018 in a specific situation</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11958615#M1741</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In a specific scenario using saveas(sfile) to save in ObjectARX 2018, after reopening the saved DWG file, it prompts that an object in a dictionary needs to be recovery. This occurs when a certain dictionary object is deleted. However, the issue does not occur if&amp;nbsp;&lt;/SPAN&gt;saveas(sfile,false)&lt;SPAN&gt;&amp;nbsp;is used or saveas(sfile) in ObjectARX 2022.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My code like:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;auto pDb = new AcDbDatabase(false, true);
auto es = pDb-&amp;gt;readDwgFile(sPath.c_str(), AcDbDatabase::kForReadAndReadShare);
... do something
es = pDb-&amp;gt;saveas(sPath);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code runs in an environment with current document and workingdatabase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to find out why it happened?&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 02:36:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11958615#M1741</guid>
      <dc:creator>3453351159</dc:creator>
      <dc:date>2023-05-12T02:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with saveas(sfile) in ObjectARX 2018 in a specific situation</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11970727#M1742</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4636986"&gt;@3453351159&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;In a specific scenario using saveas(sfile) to save in ObjectARX 2018, after reopening the saved DWG file, it prompts that an object in a dictionary needs to be recovery. This occurs when a certain dictionary object is &lt;EM&gt;deleted&lt;/EM&gt;. &lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I hope you mean "&lt;EM&gt;erased&lt;/EM&gt;" not "&lt;EM&gt;deleted&lt;/EM&gt;". You must not &lt;FONT face="courier new,courier"&gt;delete&lt;/FONT&gt; objects that are DB resident.&lt;/P&gt;
&lt;P&gt;I suppose that the erased object is still referenced within the DB. You can check references with ArxDbg's command SNOOPDB. Also the RECOVER and AUDIT command usually give hints about the objects they repair.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 16:02:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11970727#M1742</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2023-05-17T16:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with saveas(sfile) in ObjectARX 2018 in a specific situation</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11976667#M1743</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I mean is that an entity has been&amp;nbsp;PermanentlyErased.Below is the recovery information when open the dwg file:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;图形修复。
图形修复日志。
验证句柄表内的对象。
有效对象 40544  个，无效对象 1      个
对象验证完毕。
    从图形挽回的数据库。
核查表头
核查表
第 1 阶段图元核查
阶段 1 已核查 40500   个对象
第 2 阶段图元核查
阶段 2 已核查 400     个对象AcDbDictionary(60F)
   e21f8fdcb29a405e9aa0d7c85589de ePermanentlyErased    Delete Entry
阶段 2 已核查 40500   个对象
核查块
 已核查 18      个块
正在核查 AcDsRecords
共发现 1 个错误，已修复 1 个
已删除 0 个对象
正在打开 AutoCAD 2018 格式的文件。&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I think the DWG file might be corrupted, but I am unsure if there is any way to check for data issues before or after calling 'saveas'&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 06:44:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11976667#M1743</guid>
      <dc:creator>3453351159</dc:creator>
      <dc:date>2023-05-20T06:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with saveas(sfile) in ObjectARX 2018 in a specific situation</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11987895#M1744</link>
      <description>&lt;P&gt;Google translators translates:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;阶段 2 已核查 400 个对象AcDbDictionary(60F)&lt;BR /&gt;e21f8fdcb29a405e9aa0d7c85589de ePermanentlyErased Delete Entry&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Phase 2 checked 400 objects AcDbDictionary(60F)&lt;BR /&gt;e21f8fdcb29a405e9aa0d7c85589de ePermanentlyErased Delete Entry&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would assume that the entity that you erased permanently is still referenced from the &lt;FONT face="courier new,courier"&gt;AcDbDictionary&lt;/FONT&gt; with handle 60F. Make sure that you remove the object from the dictionary before you erase it permanently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 07:08:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11987895#M1744</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2023-05-25T07:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with saveas(sfile) in ObjectARX 2018 in a specific situation</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11992977#M1745</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This object was not erased before saving, and it caused data corruption in the DWG file during incremental saving. When the DWG file was reopened, CAD detected an error in the file and assumed that the entity had already been erased.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have also taken a test&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;auto pDb = new AcDbDatabase(false, true);
auto es = pDb-&amp;gt;readDwgFile(sPath.c_str(), AcDbDatabase::kForReadAndReadShare);
... do something
es = pDb-&amp;gt;saveas(sPath);

// a test after save
auto pNewDb = new AcDbDatabase(false, true);
auto es = pNewDb-&amp;gt;readDwgFile(sPath.c_str(), AcDbDatabase::kForReadAndReadShare);
pNewDb-&amp;gt;closeInput(false);
bool bNeedRevcovery = pNewDb-&amp;gt;needsRecovery();  //The value of the variable 'bNeedRecovery' is true.
if (bNeedRevcovery)   
{
    pDb-&amp;gt;saveAs(sPath.c_str(), false); //fully save and the dwg file is correct
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;However, this approach requires loading all entities, which takes a long time for large drawings and cannot be used in a production environment.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 08:15:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/issue-with-saveas-sfile-in-objectarx-2018-in-a-specific/m-p/11992977#M1745</guid>
      <dc:creator>3453351159</dc:creator>
      <dc:date>2023-05-27T08:15:53Z</dc:date>
    </item>
  </channel>
</rss>

