<?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 Retrieving Detailed Information for Dimension Elements in Archicad API in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/581273#M9029</link>
    <description>&lt;P&gt;Hello fellow developers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently working on an Archicad Add-On where I need to extract detailed information about dimension elements. My current implementation allows me to retrieve basic information such as the GUID, line pen, and text position of dimension elements. Here is a snippet of my code for context:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;void ReportDimensionElementProperties(const API_Guid&amp;amp; elementGuid, API_ElemTypeID elemType, std::ofstream&amp;amp; outFile) {
    char reportStr[1024];
    API_Element element;
    BNZeroMemory(&amp;amp;element, sizeof(API_Element));
    element.header.guid = elementGuid;

    GSErrCode err = ACAPI_Element_Get(&amp;amp;element);
    if (err == NoError &amp;amp;&amp;amp; elemType == API_DimensionID) {
        API_DimensionType&amp;amp; dimension = element.dimension;

        // Format the report string with extracted properties from linear dimension
        sprintf(reportStr, "Linear Dimension, GUID: %s, Line Pen: %d, Text Position: %d",
            APIGuidToString(elementGuid).ToCStr().Get(),
            dimension.linPen,
            dimension.textPos);

        outFile &amp;lt;&amp;lt; reportStr &amp;lt;&amp;lt; std::endl;
    }
    else {
        // Handle error in retrieving the element or unsupported element type
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I would like to delve deeper and retrieve more information such as:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The annotation text of each dimension.&lt;/LI&gt;
&lt;LI&gt;The unique IDs of these annotation texts.&lt;/LI&gt;
&lt;LI&gt;Information about which building elements (like walls, slabs, etc.) these dimensions are attached to, if applicable.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I've explored the Archicad API documentation but haven't found a clear path to achieve this. Does anyone have experience or suggestions on how to extract these additional details for dimension elements? Any insights or guidance would be greatly appreciated, especially code snippets or references to specific API functions that could be useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sercet65_0-1703114348040.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50806i2AFA376316E7DB5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="sercet65_0-1703114348040.png" alt="sercet65_0-1703114348040.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Nov 2025 03:21:15 GMT</pubDate>
    <dc:creator>sercet65</dc:creator>
    <dc:date>2025-11-25T03:21:15Z</dc:date>
    <item>
      <title>Retrieving Detailed Information for Dimension Elements in Archicad API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/581273#M9029</link>
      <description>&lt;P&gt;Hello fellow developers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently working on an Archicad Add-On where I need to extract detailed information about dimension elements. My current implementation allows me to retrieve basic information such as the GUID, line pen, and text position of dimension elements. Here is a snippet of my code for context:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;void ReportDimensionElementProperties(const API_Guid&amp;amp; elementGuid, API_ElemTypeID elemType, std::ofstream&amp;amp; outFile) {
    char reportStr[1024];
    API_Element element;
    BNZeroMemory(&amp;amp;element, sizeof(API_Element));
    element.header.guid = elementGuid;

    GSErrCode err = ACAPI_Element_Get(&amp;amp;element);
    if (err == NoError &amp;amp;&amp;amp; elemType == API_DimensionID) {
        API_DimensionType&amp;amp; dimension = element.dimension;

        // Format the report string with extracted properties from linear dimension
        sprintf(reportStr, "Linear Dimension, GUID: %s, Line Pen: %d, Text Position: %d",
            APIGuidToString(elementGuid).ToCStr().Get(),
            dimension.linPen,
            dimension.textPos);

        outFile &amp;lt;&amp;lt; reportStr &amp;lt;&amp;lt; std::endl;
    }
    else {
        // Handle error in retrieving the element or unsupported element type
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I would like to delve deeper and retrieve more information such as:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The annotation text of each dimension.&lt;/LI&gt;
&lt;LI&gt;The unique IDs of these annotation texts.&lt;/LI&gt;
&lt;LI&gt;Information about which building elements (like walls, slabs, etc.) these dimensions are attached to, if applicable.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I've explored the Archicad API documentation but haven't found a clear path to achieve this. Does anyone have experience or suggestions on how to extract these additional details for dimension elements? Any insights or guidance would be greatly appreciated, especially code snippets or references to specific API functions that could be useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sercet65_0-1703114348040.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50806i2AFA376316E7DB5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="sercet65_0-1703114348040.png" alt="sercet65_0-1703114348040.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 03:21:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/581273#M9029</guid>
      <dc:creator>sercet65</dc:creator>
      <dc:date>2025-11-25T03:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Detailed Information for Dimension Elements in Archicad API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/684749#M10710</link>
      <description>&lt;P&gt;Hello, any solutions? Maybe u've already found any?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 21:49:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/684749#M10710</guid>
      <dc:creator>galiaf_velikiy</dc:creator>
      <dc:date>2025-11-24T21:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Detailed Information for Dimension Elements in Archicad API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/684798#M10711</link>
      <description>&lt;P&gt;I think, you can get more info using&amp;nbsp;ACAPI_Element_GetMemo&lt;BR /&gt;The dimElems field contains handle of API_DimElem structures.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 09:44:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/684798#M10711</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2025-11-25T09:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Detailed Information for Dimension Elements in Archicad API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/684882#M10713</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Oleg is right, the API_DimElem array contains most of the detailed information you are looking for. You can get it with `ACAPI_Element_GetMemo()`.&lt;/P&gt;
&lt;P&gt;Specifically:&lt;/P&gt;
&lt;P&gt;1. dimElem.note.contentUStr contains the dimension text as a `GS::UniString*`.&lt;/P&gt;
&lt;P&gt;2. The GUIDs of these texts can only be obtained by iterating over `API_TextID` type elements, and checking their `owner` fields&lt;/P&gt;
&lt;P&gt;3. dimElem.base.base.type and dimElem.base.base.guid identifies the dimensioned elements&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 20:19:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Retrieving-Detailed-Information-for-Dimension-Elements-in/m-p/684882#M10713</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2025-11-25T20:19:02Z</dc:date>
    </item>
  </channel>
</rss>

