<?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: AutoCAD objects equality checking in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053398#M43911</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are comparing inside a single database, you can test the handle of each entity (the handle is unique and persistent inside a single database), otherwise you have to check the class and properties of each entity. Maybe if you explain in more detail the problem (a drawing compare?) someone can figure out a way to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaston Nunez&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>Fri, 23 May 2014 15:46:20 GMT</pubDate>
    <dc:creator>hgasty1001</dc:creator>
    <dc:date>2014-05-23T15:46:20Z</dc:date>
    <item>
      <title>AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5050406#M43906</link>
      <description>&lt;P&gt;Is the Object.GetHashCode virtual method reliable for the equality checking of AutoCAD objects? Is this method overridden for them? How we can check of their equality otherwise?&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 17:44:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5050406#M43906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-22T17:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5051620#M43907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interesting question, I think the answer is not, as the hashcode is valid only in a limited domain, and as the MS documentations says, same hash codes does not implies same object. Anyway, what kind of equality are you testing for, and what kind of objects and last, in what context (same database, side database or something else) are the tests running?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaston Nunez&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 06:48:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5051620#M43907</guid>
      <dc:creator>hgasty1001</dc:creator>
      <dc:date>2014-05-23T06:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5051638#M43908</link>
      <description>&lt;P&gt;This method is virtual. Therefore I also ask, whether redefined it Autodesk for own objects (to be guided by standard approach for the solution of this task)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;EM&gt;Anyway, what kind of equality are you testing for, and what kind of objects and last, in what context (same database, side database or something else) are the tests running?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I want to compare contents of drawings and to find their distinctions.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 06:56:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5051638#M43908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-23T06:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053242#M43909</link>
      <description>&lt;P&gt;For all AutoCAD objects GetHashCode method return memory address (pointer) of unmanaged object/entity:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;// Autodesk.AutoCAD.Runtime.DisposableWrapper&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;public&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #a52a2a;"&gt;override&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;int&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #191970; font-weight: bold;"&gt;GetHashCode&lt;/SPAN&gt;()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GC.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;KeepAlive&lt;/SPAN&gt;(&lt;SPAN style="font-weight: bold;"&gt;this&lt;/SPAN&gt;);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #000080;"&gt;return&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;int&lt;/SPAN&gt;)&lt;SPAN style="font-weight: bold;"&gt;this&lt;/SPAN&gt;.m_imp.&lt;SPAN style="color: #191970; font-weight: bold;"&gt;ToInt64&lt;/SPAN&gt;();&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this method can not help you.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 14:50:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053242#M43909</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2014-05-23T14:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053360#M43910</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;So this method can not help you.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Ok. How can I solve this problem? I need to compare AutoCAD objects.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 15:33:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053360#M43910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-23T15:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053398#M43911</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are comparing inside a single database, you can test the handle of each entity (the handle is unique and persistent inside a single database), otherwise you have to check the class and properties of each entity. Maybe if you explain in more detail the problem (a drawing compare?) someone can figure out a way to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaston Nunez&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>Fri, 23 May 2014 15:46:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053398#M43911</guid>
      <dc:creator>hgasty1001</dc:creator>
      <dc:date>2014-05-23T15:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053408#M43912</link>
      <description>&lt;P&gt;Is it important to compare identical objects or just visual duplicates?&amp;nbsp; For example, in a copy of the DWG I could copy a circle in place and erase the original.&amp;nbsp; For all intents and purposes the two drawings would be the same except the handle/object ID would be different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe reflection could offer some ways to determine properties of one object so they can be compared against against its twin.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 15:51:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053408#M43912</guid>
      <dc:creator>dgorsman</dc:creator>
      <dc:date>2014-05-23T15:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053448#M43913</link>
      <description>&lt;P&gt;Databases can be different (not the same Database). Yes, the visual duplicates, and XData (optional). Reflection works slowly, as I know. I can write own solution (through reflection), but I have a hope exists "native" decision by Autodesk.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 16:11:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5053448#M43913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-23T16:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: AutoCAD objects equality checking</title>
      <link>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5054300#M43914</link>
      <description>&lt;P&gt;There is no "native" method, but as a idea: &lt;A href="http://www.theswamp.org/index.php?topic=39991.msg452785#msg452785" target="_blank"&gt;http://www.theswamp.org/index.php?topic=39991.msg452785#msg452785&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also you can compare all (or not all) DXF-codes of both entities.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 21:35:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/autocad-objects-equality-checking/m-p/5054300#M43914</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2014-05-23T21:35:42Z</dc:date>
    </item>
  </channel>
</rss>

