<?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: edit NOD entry in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279215#M18859</link>
    <description>Hi,alexb.&lt;BR /&gt;
I just came up with the same problem as yours. My AcDbObject derived custom object was stored in an extension dictionary. After i mofied some value and then save and close it, it would be gone and i would receive ePermanentlyErased when i reopen the file.&lt;BR /&gt;
Have you fixed it yet?

Message was edited by: xiehui.luo</description>
    <pubDate>Sat, 05 Jul 2008 04:46:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-07-05T04:46:24Z</dc:date>
    <item>
      <title>edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279209#M18853</link>
      <description>Hi&lt;BR /&gt;
I am using NOD to store program data:&lt;BR /&gt;
NOD = Key = Subkey + AcDbObject -derived class.&lt;BR /&gt;
All is well, but when I try to modify some of the class member values, after Save. Open, the class is gone from the dictionary and I get eWasPermanentlyErased.&lt;BR /&gt;
Can somebody point me to an example of editing the data stored in NOD, please?&lt;BR /&gt;
TIA&lt;BR /&gt;
&lt;BR /&gt;
alex</description>
      <pubDate>Mon, 16 Jun 2008 17:45:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279209#M18853</guid>
      <dc:creator>alex_b</dc:creator>
      <dc:date>2008-06-16T17:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279210#M18854</link>
      <description>Nobody done this before?&lt;BR /&gt;
Maybe the Autodesk people?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
alex</description>
      <pubDate>Fri, 20 Jun 2008 05:01:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279210#M18854</guid>
      <dc:creator>alex_b</dc:creator>
      <dc:date>2008-06-20T05:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279211#M18855</link>
      <description>It sounds like one of the dictionaries (either the NOD or your sub-dictionary) is treating its elements as soft, which is the default.  Are you calling AcDbDictionary::setTreatElementsAsHard(true) on all the dictionaries in the chain?&lt;BR /&gt;
&lt;BR /&gt;
Andy F.</description>
      <pubDate>Fri, 20 Jun 2008 20:04:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279211#M18855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-20T20:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279212#M18856</link>
      <description>Yes, I am.&lt;BR /&gt;
Maybe something else is wrong.&lt;BR /&gt;
Could you look at the attached code excerpt?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
alex</description>
      <pubDate>Sat, 21 Jun 2008 05:40:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279212#M18856</guid>
      <dc:creator>alex_b</dc:creator>
      <dc:date>2008-06-21T05:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279213#M18857</link>
      <description>else if (es == Acad::eKeyNotFound) {&lt;BR /&gt;
		pDict = new AcDbDictionary;&lt;BR /&gt;
		AcDbObjectId DictId;&lt;BR /&gt;
		es = pNamedobj-&amp;gt;setAt(ProgName, pDict, DictId);&lt;BR /&gt;
&lt;BR /&gt;
/////////////////////////////&lt;BR /&gt;
// Did you mean to set pNamedobj as hard here instead of pDict?&lt;BR /&gt;
///////////////////////////&lt;BR /&gt;
		pDict-&amp;gt;setTreatElementsAsHard(Adesk::kTrue);&lt;BR /&gt;
		pNamedobj-&amp;gt;close();&lt;BR /&gt;
			&lt;BR /&gt;
		AcDbObjectId rId;&lt;BR /&gt;
		es = pDict-&amp;gt;setAt(SingleObjName, pConfigData, rId);//append the object&lt;BR /&gt;
		if (es != Acad::eOk) {//did not succeed: &lt;BR /&gt;
			pDict-&amp;gt;close();&lt;BR /&gt;
			return es;&lt;BR /&gt;
		}&lt;BR /&gt;
		else {//create did succeed&lt;BR /&gt;
			pConfigData-&amp;gt;close();&lt;BR /&gt;
			pDict-&amp;gt;setTreatElementsAsHard(Adesk::kTrue);&lt;BR /&gt;
			pDict-&amp;gt;close();&lt;BR /&gt;
		}&lt;BR /&gt;
		return Acad::eOk;&lt;BR /&gt;
	}//if eKeyNotFound&lt;BR /&gt;
&lt;BR /&gt;
----------------------------&lt;BR /&gt;
&lt;BR /&gt;
I see pDict being set to treat its elements as hard twice with no similar call on the NOD.</description>
      <pubDate>Sat, 21 Jun 2008 12:31:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279213#M18857</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-06-21T12:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279214#M18858</link>
      <description>Andy&lt;BR /&gt;
It's not that. I tried it and I still get eWasPermanentlyErased when trying to read the dictionary after performing a Save followed by an Open.&lt;BR /&gt;
Actually, when opening the saved drawing, I get a Autocad message as:&lt;BR /&gt;
Warning. One error was found during open. .....&lt;BR /&gt;
When Recovering the drawing we get:&lt;BR /&gt;
....&lt;BR /&gt;
Reading handle 7F object type XElConfig&lt;BR /&gt;
Error 67 (eDwgObjectImproperlyRead)           Object discarded&lt;BR /&gt;
&lt;BR /&gt;
Auditing Header&lt;BR /&gt;
&lt;BR /&gt;
Auditing Tables&lt;BR /&gt;
&lt;BR /&gt;
Auditing Entities Pass 1&lt;BR /&gt;
&lt;BR /&gt;
Pass 1 100     objects audited&lt;BR /&gt;
Auditing Entities Pass 2&lt;BR /&gt;
&lt;BR /&gt;
AcDbDimStyleTableRecord: "ISO-25"  Not in Table          Added&lt;BR /&gt;
Pass 2 100     objects auditedAcDbDictionary(7E)&lt;BR /&gt;
                  XEl_CONFIG ePermanentlyErased    Delete Entry&lt;BR /&gt;
&lt;BR /&gt;
Auditing Blocks&lt;BR /&gt;
.....&lt;BR /&gt;
It seems that something is written-out/read-in incorrectly  by dwgOut/InFields(), but in the debugger everything returns Acad::eOk.&lt;BR /&gt;
Any ideas?&lt;BR /&gt;
I attach dwgOutFields/dwgInFields code, as well as the config class member variables declarations.&lt;BR /&gt;
Thank you&lt;BR /&gt;
&lt;BR /&gt;
alex</description>
      <pubDate>Sat, 21 Jun 2008 16:32:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279214#M18858</guid>
      <dc:creator>alex_b</dc:creator>
      <dc:date>2008-06-21T16:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279215#M18859</link>
      <description>Hi,alexb.&lt;BR /&gt;
I just came up with the same problem as yours. My AcDbObject derived custom object was stored in an extension dictionary. After i mofied some value and then save and close it, it would be gone and i would receive ePermanentlyErased when i reopen the file.&lt;BR /&gt;
Have you fixed it yet?

Message was edited by: xiehui.luo</description>
      <pubDate>Sat, 05 Jul 2008 04:46:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279215#M18859</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-05T04:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279216#M18860</link>
      <description>Yes . The fix I came up with was never modify the in-dictionary object.&lt;BR /&gt;
Instead, remove() the old object (this removes the key as well) instantiate a new object and create the dictionary entry anew, key and all.&lt;BR /&gt;
It works for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Maybe the Autodesk people will tell us why the &lt;BR /&gt;
modify-in-place method won't work.&lt;BR /&gt;
&lt;BR /&gt;
alex</description>
      <pubDate>Sat, 05 Jul 2008 05:27:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279216#M18860</guid>
      <dc:creator>alex_b</dc:creator>
      <dc:date>2008-07-05T05:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279217#M18861</link>
      <description>Yes it also works for me. But now i am looking for another way to get around this.&lt;BR /&gt;
Have you ever tried the AcDbXRecord object? Before i revise my code to store my app data in the custom object, i stored them in some XRecord objects which resident also in the extension dictionary. They worked all right regardless of my modify,save,close and reopen operations.&lt;BR /&gt;
Maybe i will tried to derived it from XRecord object instead. &lt;BR /&gt;
&lt;BR /&gt;
We are doing the same thing as you mentioned int post "What the dictionary can store".</description>
      <pubDate>Sat, 05 Jul 2008 06:00:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279217#M18861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-05T06:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279218#M18862</link>
      <description>I am probably content with the way it works, so I wouldn't look at AcDbXrecord for this item, but see my post dwgInFields from July 4 for what seems to be a (hopefuly solvable) glitch.&lt;BR /&gt;
And BTW, happy 4th July to our American friends.&lt;BR /&gt;
&lt;BR /&gt;
alex</description>
      <pubDate>Sat, 05 Jul 2008 09:29:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279218#M18862</guid>
      <dc:creator>alex_b</dc:creator>
      <dc:date>2008-07-05T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: edit NOD entry</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279219#M18863</link>
      <description>Hi, alexb,I'm sure you must have done something wrong. &lt;BR /&gt;
I am doing exactly what you are trying to achieve, and at the beginning i came up with the same problem as yours. Then I create another class derived from AcDbObject it worked all right just like the built-in AcDbXRecord, and no eWasPermanentlyErased was received. After that i succeeded to create several other AcDbObject custom class which also resident in the NOD, and they all worked fine.&lt;BR /&gt;
So i am pretty sure we had made some mistake, but the problem is i can't find out what the mistake was.</description>
      <pubDate>Thu, 16 Apr 2009 11:01:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/edit-nod-entry/m-p/2279219#M18863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-16T11:01:53Z</dc:date>
    </item>
  </channel>
</rss>

