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.

What error is -2130312307?

LeeJaeYoung
Virtuoso

LeeJaeYoung_0-1675178670141.png

 

What error is -2130312307?

I added a menu in element_test and an error occurred, so I modified the existing menu, but the same error occurs.

This is the ac26 version.

 

 

GSErrCode __ACENV_CALL ElementsHotlink (const API_MenuParams *menuParams)
{
GSErrCode err = NoError;
switch (menuParams->menuItemRef.itemIndex) {
case 1: Do_CreateBeam(); break;
//case 1: err = Do_CreateHotlink (); break;
case 2: err = Do_ChangeHotlink (); break;
case 3: err = Do_UpdateHotlink (); break;
case 4: err = Do_DeleteHotlink (); break;
case 5: err = Do_BreakHotlink (); break;
case 6: Do_ListHotlinks (); break;
case 7: Do_ListHotlinkProxyElements (); break;
case 8: Do_ModifiyHotlinkNode (); break;

default: break;
}

return err;
} /* ElementsHotlink */
AC27 on window 11
4 REPLIES 4
Miha Nahtigal
Advocate

Are you calling your create element function inside ACAPI_CallUndoableCommand block?

BIMquants.comBETA - Quantities and Costs Estimation with Archicad AddOn :: rushing to publish a beta preview

Archicad Error Codes 

 

APIERR_NEEDSUNDOSCOPE -2130312307 8106038D The called command should be encapsulated in a ACAPI_CallUndoableCommand scope.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

I found out about my problem and fixed it.
Thank you very much.

And
If you know how ac26 develops api with visual studio 2019, can you explain in detail?
I can't make it with cmake
I am studying while adding in element_test.
I also got a template file, but this is a question because I don't know where and how to install it and how to run it.

 

Re: How to start api (c++) in 26? - Graphisoft Community

AC27 on window 11
akiss
Graphisoft
Graphisoft

Hi

The best way to start developing Archicad AddOns is to follow the steps in Getting started with Archicad Add-Ons.

 

Best regards,

András

 

Learn and get certified!