2023-01-31 04:28 PM - last edited on 2023-02-08 12:27 PM by Laszlo Nagy
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 */
2023-01-31 04:51 PM
Are you calling your create element function inside ACAPI_CallUndoableCommand block?
2023-01-31 06:31 PM
APIERR_NEEDSUNDOSCOPE |
-2130312307 | 8106038D | The called command should be encapsulated in a ACAPI_CallUndoableCommand scope. |
2023-02-01 12:37 AM
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
2023-02-13 08:27 AM
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