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

Dialog function errors

ReignBough
Enthusiast
Is there a way to get the error a dialog function encounters? Example, DGAppendDialogItem() returns 0 if an error was encountered. But what is this error? Did I pass a wrong ID, type, sub-type, etc? Is there a function that I can call to get this error, like GetLastError().

EDIT 1: 2014 Sep 10

I asked this since I am unable to add a button on AC18. Here is my code:
short my_idx = DGAppendDialogItem(iDialId, DG_ITM_BUTTON, DG_BT_TEXT, 0, 10, 10, 80, 30);
if (my_idx == 0) WriteReport("[DialogTypes] Error! Cannot append ItemType: DG_ITM_BUTTON");
DGShowItem(iDialId, my_idx);
DGSetItemText(iDialId, my_idx, "Okay");
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
1 REPLY 1
ReignBough
Enthusiast
On EDIT 1

Found out that DG_BT_ICONTEXT is now used as sub-type for buttons.
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS