<?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 How to get dimension's node_id? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-dimension-s-node-id/m-p/354030#M1592</link>
    <description>&lt;P&gt;I am trying to dimension an object (elevation view), I used the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Get the element (API_SectElem).&lt;/LI&gt;&lt;LI&gt;Call ACAPI_Element_GetHotspots to get hotspots.&lt;/LI&gt;&lt;LI&gt;Set values for dimension (API_DimensionType).&lt;/LI&gt;&lt;LI&gt;For each API_DimElem (on memo) of that dimension, set the following:&lt;UL&gt;&lt;LI&gt;dimElem.base.base.typeID = elem.header.typeID&lt;/LI&gt;&lt;LI&gt;dimElem.base.guid = elem.header.guid&lt;/LI&gt;&lt;LI&gt;hotspot[i].Get(neig, coord)&lt;/LI&gt;&lt;LI&gt;dimElem.base.inIndex = neig.inIndex&lt;/LI&gt;&lt;LI&gt;dimElem.pos = ToCoord(coord)&lt;/LI&gt;&lt;LI&gt;dimElem.pos3D = coorddimElem.base.loc3D = coord&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Create dimension.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;There were no error upon doing this but it did not create a dimension. I then tried to print the supposedly created dimension (after calling ACAPI_Element_Create) and the details were there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I manually created a dimension to these same hotspots and print its detail. What I noticed is that the &lt;STRONG&gt;node_id&lt;/STRONG&gt; has value and &lt;STRONG&gt;inIndex&lt;/STRONG&gt; is 0. During debug, I forced the values on node_id (Watch window) and the dimension was created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the documentation, node_id is the polygon vertex id from element with polygon. I am trying to get these value to attach dimensions to it. But object elements do not have polygon. Object's gable also do not have vertex id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How or where to get these node_id's? Is there a function that can be called something like Neig_To_DimElem?&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 08:05:51 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2022-08-30T08:05:51Z</dc:date>
    <item>
      <title>How to get dimension's node_id?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-dimension-s-node-id/m-p/354030#M1592</link>
      <description>&lt;P&gt;I am trying to dimension an object (elevation view), I used the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Get the element (API_SectElem).&lt;/LI&gt;&lt;LI&gt;Call ACAPI_Element_GetHotspots to get hotspots.&lt;/LI&gt;&lt;LI&gt;Set values for dimension (API_DimensionType).&lt;/LI&gt;&lt;LI&gt;For each API_DimElem (on memo) of that dimension, set the following:&lt;UL&gt;&lt;LI&gt;dimElem.base.base.typeID = elem.header.typeID&lt;/LI&gt;&lt;LI&gt;dimElem.base.guid = elem.header.guid&lt;/LI&gt;&lt;LI&gt;hotspot[i].Get(neig, coord)&lt;/LI&gt;&lt;LI&gt;dimElem.base.inIndex = neig.inIndex&lt;/LI&gt;&lt;LI&gt;dimElem.pos = ToCoord(coord)&lt;/LI&gt;&lt;LI&gt;dimElem.pos3D = coorddimElem.base.loc3D = coord&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Create dimension.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;There were no error upon doing this but it did not create a dimension. I then tried to print the supposedly created dimension (after calling ACAPI_Element_Create) and the details were there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I manually created a dimension to these same hotspots and print its detail. What I noticed is that the &lt;STRONG&gt;node_id&lt;/STRONG&gt; has value and &lt;STRONG&gt;inIndex&lt;/STRONG&gt; is 0. During debug, I forced the values on node_id (Watch window) and the dimension was created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the documentation, node_id is the polygon vertex id from element with polygon. I am trying to get these value to attach dimensions to it. But object elements do not have polygon. Object's gable also do not have vertex id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How or where to get these node_id's? Is there a function that can be called something like Neig_To_DimElem?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 08:05:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-get-dimension-s-node-id/m-p/354030#M1592</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2022-08-30T08:05:51Z</dc:date>
    </item>
  </channel>
</rss>

