<?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 [SOLVED] How to find element by IFC Guid in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254387#M5493</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;My goal is to find element by IFC Guid&lt;BR /&gt;I have no choice to find by TagID because I'm getting IfcGUID from webAPI and I have to search by IFC GUID.&lt;BR /&gt;&lt;BR /&gt;Is there any way to do that ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ifcguid.png" style="width: 864px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/12307i0C635658E7851399/image-size/large?v=v2&amp;amp;px=999" role="button" title="ifcguid.png" alt="ifcguid.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2023 11:33:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-01T11:33:14Z</dc:date>
    <item>
      <title>[SOLVED] How to find element by IFC Guid</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254387#M5493</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;My goal is to find element by IFC Guid&lt;BR /&gt;I have no choice to find by TagID because I'm getting IfcGUID from webAPI and I have to search by IFC GUID.&lt;BR /&gt;&lt;BR /&gt;Is there any way to do that ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ifcguid.png" style="width: 864px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/12307i0C635658E7851399/image-size/large?v=v2&amp;amp;px=999" role="button" title="ifcguid.png" alt="ifcguid.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:33:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254387#M5493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! How to find element by IFC Guid</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254388#M5494</link>
      <description>Hi, &lt;BR /&gt;
 &lt;BR /&gt;
First you have to convert string IFC guid to API_Guid, after that you can search the elements with the given guid. &lt;BR /&gt;
Here is an example code for you: 
&lt;PRE&gt;GS::UniString	ifcGuid = "32vZ_y6Kf8bQUeOicmrSnx"; // string IFC Guid 
API_Guid		apiGuid; 
if (ACAPI_Goodies (APIAny_IFCGuidToAPIGuidID, &amp;amp;ifcGuid, &amp;amp;apiGuid, NULL) == NoError) { 
	GS::Array&amp;lt;API_Guid&amp;gt; elements; 
 
	if (ACAPI_Element_GetElemListByIFCIdentifier (NULL, &amp;amp;apiGuid, elements) == NoError) { 
		for (GS::Array&amp;lt;API_Guid&amp;gt;::ConstIterator it = elements.Enumerate (); it != NULL; ++it) { 
			API_Element	element; 
			BNZeroMemory (&amp;amp;element, sizeof (API_Element)); 
			element.header.guid = *it; 
 
			if (ACAPI_Element_Get (&amp;amp;element) == NoError) { 
				// now you have the element 
			} 
		} 
	} 
}&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
Regards, &lt;BR /&gt;
Tibor</description>
      <pubDate>Wed, 18 Mar 2015 08:59:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254388#M5494</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2015-03-18T08:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORTANT! How to find element by IFC Guid</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254389#M5495</link>
      <description>Thank you very much for the help Tibor.&lt;BR /&gt;
&lt;BR /&gt;
But I changed a thing in your code in order elements comes not empty&lt;BR /&gt;
&lt;BR /&gt;
I also pass &amp;amp;apiGuid as first parameter of ACAPI_Element_GetElemListByIFCIdentifier &lt;BR /&gt;
&lt;BR /&gt;
like this&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Element_GetElemListByIFCIdentifier (&amp;amp;apiGuid, &amp;amp;apiGuid, elements)&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Thu, 19 Mar 2015 07:37:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-find-element-by-IFC-Guid/m-p/254389#M5495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-19T07:37:20Z</dc:date>
    </item>
  </channel>
</rss>

