We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2015-08-02 08:35 PM - last edited on 2023-07-13 03:44 PM by Doreena Deng
GSErrCode __ACENV_CALL RegisterInterface (void) { GSErrCode err = ACAPI_Register_Menu (32500, 32520, MenuCode_Tools, MenuFlag_Default); if (err != NoError) DBPrintf ("ACAddOn1:: RegisterInterface() ACAPI_Register_Menu failed\n"); return err; } GSErrCode __ACENV_CALL Initialize (void) { GSErrCode err = ACAPI_Install_MenuHandler (32500, MenuCommandHandler); if (err != NoError) DBPrintf ("ACAddOn1:: Initialize() ACAPI_Install_MenuHandler failed\n"); return err; } GSErrCode __ACENV_CALL MenuCommandHandler (const API_MenuParams *menuParams) { DBPrintf ("ACAddOn1::MenuCommandHandler() %d/%d\n", menuParams->menuItemRef.menuResID, menuParams->menuItemRef.itemIndex); return NoError; }My ACAddOn1.grc file:
'STR#' 32500 "Menu strings" { /* [ 1] */ "Sample menu" } 'STR#' 32520 "Status bar strings" { /* [ 1] */ "Sample" }If I put breakpoints in RegisterInterface and Initialize, I see they are well executed and NoError is returned. But my breakpoint in MenuCommandHandler is never hit. And there is no output.
2015-08-02 09:04 PM