We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2016-04-28 08:59 AM - last edited on 2023-07-12 09:08 PM by Doreena Deng
GSErrCode err = NoError; err = ACAPI_Register_Menu(ID_MENU_STR_1, ID_MENU_STA_1, MenuCode_UserDef, MenuFlag_SeparatorBefore); PrintfError(__LINE__, err); //else //if (err == NoError) err = ACAPI_Register_Menu(ID_MENU_STR_2, ID_MENU_STA_2, MenuCode_UserDef, MenuFlag_InsertIntoSame); PrintfError(__LINE__, err);
2016-05-13 02:18 PM
2016-05-17 04:31 AM
gehairing wrote:Changes in the menu / .grc files will not show up immediately with a simple build. You need to rebuild the addon (using Build sometimes doesn't recompile the .grc files), THEN close your ArchiCAD and open it again (close everything to make sure). Either that or remove and reattach the addon.
When i add menu items once, build & run my addon...then i change the menu items (names, positions via the MenuCode_xxx) the menu won't change. I try rebuilding everything, compile the grc individually. Nothing changes.
2016-05-17 08:15 AM
Erenford wrote:Thanks a lot for your answer.
Changes in the menu / .grc files will not show up immediately with a simple build. You need to rebuild the addon (using Build sometimes doesn't recompile the .grc files), THEN close your ArchiCAD and open it again (close everything to make sure). Either that or remove and reattach the addon.
The menu stuff is only updated during addon's CheckEnvironment / RegisterInterface, which loads during ArchiCAD's startup or when addon is attached.
// Interface definitions GSErrCode __ACDLL_CALL RegisterInterface (void) { InitializeLanguageCodes(); GSErrCode err = ACAPI_Register_Menu (12500, 12520, MenuCode_Palettes, MenuFlag_Default);
'STR#' 12500 "Strings for the Menu" { /* [ ] */ "Show/Hide palette^E3^E2" }Before last week i had the same plugin working and the menu items where added to the "MenuCode_GDLObjects" menu. This worked well.
2016-05-17 09:02 AM
gehairing wrote:Sure you deleted traces of your old code in RegisterInterface or in grc?
Before last week i had the same plugin working and the menu items where added to the "MenuCode_GDLObjects" menu. This worked well.
Now i have changed the user interface and i use a palette for the commands. So i wanted to change my menus and simply add one item for show/hide the palette in the palette menu (MenuCode_Palettes).
But my new "Show/Hide" menu item still appears in the "MenuCode_GDLObjects" menu. It seem's something is memorized somewhere. Very very strange.
2016-05-17 09:44 AM