BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

How to get dimension's node_id?

ReignBough
Enthusiast

I am trying to dimension an object (elevation view), I used the following:

  1. Get the element (API_SectElem).
  2. Call ACAPI_Element_GetHotspots to get hotspots.
  3. Set values for dimension (API_DimensionType).
  4. For each API_DimElem (on memo) of that dimension, set the following:
    • dimElem.base.base.typeID = elem.header.typeID
    • dimElem.base.guid = elem.header.guid
    • hotspot[i].Get(neig, coord)
    • dimElem.base.inIndex = neig.inIndex
    • dimElem.pos = ToCoord(coord)
    • dimElem.pos3D = coorddimElem.base.loc3D = coord
  5. Create dimension.


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.

 

Then, I manually created a dimension to these same hotspots and print its detail. What I noticed is that the node_id has value and inIndex is 0. During debug, I forced the values on node_id (Watch window) and the dimension was created.

 

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.

 

How or where to get these node_id's? Is there a function that can be called something like Neig_To_DimElem?

~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
0 REPLIES 0
Learn and get certified!