<?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: What is unique in Document so that I can use IEqualityComparer on it in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671534#M23277</link>
    <description>&lt;LI-CODE lang="csharp"&gt;public override int GetHashCode()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the 'override' keyword i.e. it isn't just inherited from Object with dubious implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;RevitAPI.chm:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;"The hash code is the same for document instances that represent the same document currently opened in the Revit session. The hash code is generated when a Revit file is opened or created in session. If the same Revit file is opened later (in the same session or a different session) the hash code will not be the same."&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Oct 2021 21:22:39 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2021-10-06T21:22:39Z</dc:date>
    <item>
      <title>What is unique in Document so that I can use IEqualityComparer on it</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10669418#M23275</link>
      <description>&lt;P&gt;I have some document elements from link documents or primary document.&lt;BR /&gt;I want to get if they are from any link document which RevitLinkInstances they are from.&lt;BR /&gt;From Element I can get its parentDocument, I can compare with all available documents and gather Their RevitLinkInstances per element.&lt;BR /&gt;But how do I know that both documents are same?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 06:37:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10669418#M23275</guid>
      <dc:creator>sahin.ikbal</dc:creator>
      <dc:date>2021-10-06T06:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: What is unique in Document so that I can use IEqualityComparer on it</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671402#M23276</link>
      <description>&lt;P&gt;I have found the best way to do this is to make sure that when you store the docs, you store them in a dictionary or sorted list that has a Key / Value relationship and then use project name or number or both to compare and pull from the dictionary. You could also just search for the element in the doc and if it returns a null then you know its not that doc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then when you pull the Document from the If they are workshared, you could use the&amp;nbsp;WorksharingCentralGUID property and compare those.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I don't believe there is a straight forward and easy way to compare them like GUID or Id.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 20:23:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671402#M23276</guid>
      <dc:creator>Sean_Page</dc:creator>
      <dc:date>2021-10-06T20:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: What is unique in Document so that I can use IEqualityComparer on it</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671534#M23277</link>
      <description>&lt;LI-CODE lang="csharp"&gt;public override int GetHashCode()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the 'override' keyword i.e. it isn't just inherited from Object with dubious implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;RevitAPI.chm:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;"The hash code is the same for document instances that represent the same document currently opened in the Revit session. The hash code is generated when a Revit file is opened or created in session. If the same Revit file is opened later (in the same session or a different session) the hash code will not be the same."&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 21:22:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671534#M23277</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-10-06T21:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: What is unique in Document so that I can use IEqualityComparer on it</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671539#M23278</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I have tried for a while to figure out how to really make this work for much of anything, and although if you only have work to do in a single session then this would work great, but unfortunately for me that most often isn't the case as we need persistent data.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 21:25:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671539#M23278</guid>
      <dc:creator>Sean_Page</dc:creator>
      <dc:date>2021-10-06T21:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is unique in Document so that I can use IEqualityComparer on it</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671548#M23279</link>
      <description>&lt;P&gt;Yes that is true it is an in-memory thing but I was thinking&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7136965"&gt;@sahin.ikbal&lt;/a&gt;&amp;nbsp;was only dealing with documents that were opened in the active session. i.e. for when a project is loaded the links open in the background becoming part of the document set.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 21:28:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/what-is-unique-in-document-so-that-i-can-use-iequalitycomparer/m-p/10671548#M23279</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-10-06T21:28:33Z</dc:date>
    </item>
  </channel>
</rss>

