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.

Creating elevation marker and APIERR_BADID [SOLVED]

ReignBough
Enthusiast
I created an elevation marker using ACAPI_Element_CreateExt. At first it returns APIERR_PADPARS. But when I changed the marker type to "Built-in Elevation Marker", it returns an APIERR_BADID. When I debugged the add-on, it passed the element type (API_ElevationID) check and the marker type check. It fails after the marker type check (I don't know what ID it is checking after that).

I also traced that the API is comparing some structure value of 0x40 to 2 which causes it to return the APIERR_BADID.

EDIT: (2015 Dec 03)
When I tried it on different model, the elevation marker was created with no error. This makes me think that the 0x40 check has something to do with the model itself and not the created elevation marker. Also, I can create elevation marker manually on both model with no error.

EDIT: (2015 Dec 04)
I found out that it is not the 0x40 check that causing it. I continue on my tracing and found that there is an elevation class with bool/char value at offset 0x0A30 equal to 1. (I called it this way because of the 'ELEV' that can be seen somewhere at the 'header' of the binary data.) When I modify this binary value to 0, I was able to create an elevation marker. I am not sure what this value is and how to correct this in my model.

EDIT: (2015 Dec 07)
I found that this 0x0A30 is the 'with Marker reference to' value.
~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!