<?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: Why the element guid get from two APIs does not the same? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396630#M1036</link>
    <description>&lt;P&gt;the variable name is &lt;EM&gt;databaseID&lt;/EM&gt;, on elevation/section its in&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;API_Element -&amp;gt; cutPlane / elevation -&amp;gt; segment -&amp;gt; databaseID&lt;/LI-CODE&gt;&lt;P&gt;If its a detail/worksheet marker its&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;API_Element -&amp;gt; detail / worksheet -&amp;gt; databaseID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If its an interior elevation then its also on API_SectionSegment but on element memo, as the one on the element is only the default settings of the child segments&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// first get the array count
API_Element -&amp;gt; interiorElevation -&amp;gt; nLineCoords
// access the memo
API_ElementMemo -&amp;gt; *intElevSegments (pointer array) -&amp;gt; databaseID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm assuming you already know this only works on marker elements, since those are the only elements with views and databases, and will appear on the navigator. If there's any other element I forgot, just try to find something that is of type &lt;EM&gt;API_DatabaseUnID&lt;/EM&gt; or named &lt;EM&gt;databaseID.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2023 09:05:14 GMT</pubDate>
    <dc:creator>Erenford</dc:creator>
    <dc:date>2023-08-30T09:05:14Z</dc:date>
    <item>
      <title>Why the element guid get from two APIs does not the same?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/394725#M1033</link>
      <description>&lt;P&gt;I am try to compare the element guids get from below 2 difference methods, wondering why it is not the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;method1:&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;GS::Array&amp;lt;API_Guid&amp;gt; elevationMask{};
GSErrCode err = ACAPI_Element_GetElemList(API_ElevationID, &amp;amp;elevationMask);&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;method2:&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;GS::Array&amp;lt;API_NavigatorItem&amp;gt; items;
API_NavigatorItem item = {};
item.guid = NavigatorSet.rootGuid;
item.mapId = NavigatorPaletteTestGlobals::GetInstance().GetNavigatorMapID();
GSErrCode err = ACAPI_Navigator(APINavigator_GetNavigatorChildrenItemsID, &amp;amp;item, nullptr, &amp;amp;items);
for (API_NavigatorItem&amp;amp; childItem : items) {
ACAPI_WriteReport(APIGuidToString(childItem.guid).ToCStr().Get(),false);
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Is there anyone could help?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Aug 2023 13:07:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/394725#M1033</guid>
      <dc:creator>Newbie</dc:creator>
      <dc:date>2023-08-10T13:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why the element guid get from two APIs does not the same?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/394862#M1034</link>
      <description>&lt;P&gt;ACAPI_Element_*** APIs refer to the specific element instances in the model, in this case the elevation marker. Marker elements also have a corresponding database which refers to its view.&lt;/P&gt;&lt;P&gt;While ACAPI_Navigator APIs exclusively refer to the navigator items in the treeview Navigator palette.&lt;/P&gt;&lt;P&gt;If you want to see which navigator item corresponds your element instance then you compare the element's DatabaseUnId to the navigator DatabaseUnId (API_NavigatorItem.db.databaseUnId)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you check the "linkedElement" in the Navigator item (API_NavigatorItem.db.linkedElement)&lt;/P&gt;&lt;P&gt;If its empty/null try getting the database first (APIDb_GetDatabaseInfoID), getting the API_NavigatorItem usually doesn't fill up the whole database structure, only the unId&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 05:18:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/394862#M1034</guid>
      <dc:creator>Erenford</dc:creator>
      <dc:date>2023-08-14T05:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why the element guid get from two APIs does not the same?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396628#M1035</link>
      <description>&lt;P&gt;Hi Erenford,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you've mentioned to compare &lt;SPAN&gt;&lt;STRONG&gt;element's DatabaseUnId&lt;/STRONG&gt; to the navigator DatabaseUnId (API_NavigatorItem.db.databaseUnId), I'm having trouble getting DatabaseUnId of an element. It is not a listed property.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please explain how to get the DatabaseUnId of an element?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 08:37:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396628#M1035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-30T08:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why the element guid get from two APIs does not the same?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396630#M1036</link>
      <description>&lt;P&gt;the variable name is &lt;EM&gt;databaseID&lt;/EM&gt;, on elevation/section its in&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;API_Element -&amp;gt; cutPlane / elevation -&amp;gt; segment -&amp;gt; databaseID&lt;/LI-CODE&gt;&lt;P&gt;If its a detail/worksheet marker its&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;API_Element -&amp;gt; detail / worksheet -&amp;gt; databaseID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If its an interior elevation then its also on API_SectionSegment but on element memo, as the one on the element is only the default settings of the child segments&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// first get the array count
API_Element -&amp;gt; interiorElevation -&amp;gt; nLineCoords
// access the memo
API_ElementMemo -&amp;gt; *intElevSegments (pointer array) -&amp;gt; databaseID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm assuming you already know this only works on marker elements, since those are the only elements with views and databases, and will appear on the navigator. If there's any other element I forgot, just try to find something that is of type &lt;EM&gt;API_DatabaseUnID&lt;/EM&gt; or named &lt;EM&gt;databaseID.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 09:05:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396630#M1036</guid>
      <dc:creator>Erenford</dc:creator>
      <dc:date>2023-08-30T09:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why the element guid get from two APIs does not the same?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396782#M1037</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I understand now how this works but still have issues if all items give out DatabaseUnId info or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 05:25:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Why-the-element-guid-get-from-two-APIs-does-not-the-same/m-p/396782#M1037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-31T05:25:31Z</dc:date>
    </item>
  </channel>
</rss>

