<?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 Get elements inside drawing cropped view in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-elements-inside-drawing-cropped-view/m-p/309796#M1838</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;I am trying to get all elements (specifically wall) from a drawing element. This drawing element is a view of a floor plan. Here is my initial code:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;// change database
BNZeroMemory(&amp;amp;dbInfo, sizeof(API_DatabaseInfo));
dbInfo.typeID = APIWind_DrawingID;
dbInfo.linkedElement = i_drawingGuid;
err = ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &amp;amp;dbInfo);

// get all elements on this database
GS::Array&amp;lt;API_Guid&amp;gt; guids = {};
ACAPI_Element_GetElemList(i_elemType, &amp;amp;guids, APIFilt_InCroppedView);
Int32 cnt = guids.GetSize();
for (Int32 i = 0; i &amp;lt; cnt; ++i)
{
    API_Element elem;
    BNZeroMemory(&amp;amp;elem, API_ElementSize);
    elem.header.guid = guids[i];
    ACAPI_Element_Get(&amp;amp;elem);
    DBGPrintlnf("%u ?= %u", i_elemType, elem.header.typeID);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;ACAPI_Database returns APIERR_BADPARS. And I think it is the dbInfo.databaseUnId, since it is not set. What is the value that should be place here?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 25 Oct 2021 02:57:34 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2021-10-25T02:57:34Z</dc:date>
    <item>
      <title>Get elements inside drawing cropped view</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-elements-inside-drawing-cropped-view/m-p/309796#M1838</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;I am trying to get all elements (specifically wall) from a drawing element. This drawing element is a view of a floor plan. Here is my initial code:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;// change database
BNZeroMemory(&amp;amp;dbInfo, sizeof(API_DatabaseInfo));
dbInfo.typeID = APIWind_DrawingID;
dbInfo.linkedElement = i_drawingGuid;
err = ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &amp;amp;dbInfo);

// get all elements on this database
GS::Array&amp;lt;API_Guid&amp;gt; guids = {};
ACAPI_Element_GetElemList(i_elemType, &amp;amp;guids, APIFilt_InCroppedView);
Int32 cnt = guids.GetSize();
for (Int32 i = 0; i &amp;lt; cnt; ++i)
{
    API_Element elem;
    BNZeroMemory(&amp;amp;elem, API_ElementSize);
    elem.header.guid = guids[i];
    ACAPI_Element_Get(&amp;amp;elem);
    DBGPrintlnf("%u ?= %u", i_elemType, elem.header.typeID);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;ACAPI_Database returns APIERR_BADPARS. And I think it is the dbInfo.databaseUnId, since it is not set. What is the value that should be place here?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Oct 2021 02:57:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-elements-inside-drawing-cropped-view/m-p/309796#M1838</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2021-10-25T02:57:34Z</dc:date>
    </item>
  </channel>
</rss>

