Quantcast
Channel: ArchiCAD-Talk - Developer Forum
Viewing all articles
Browse latest Browse all 564

Menu problem

$
0
0
Author:gehairing
Posted: Tue May 17, 2016 7:15 am (GMT+1)


Erenford 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.

The menu stuff is only updated during addon's CheckEnvironment / RegisterInterface, which loads during ArchiCAD's startup or when addon is attached.


Thanks a lot for your answer.

Yes of course i rebuild completely the plugin because the simple build only rebuilds the code. After rebuild the plugin is regenerated and copied in the extension folder and then Archicad is relaunched and the loading process is made again.

I use this code to put my menu in the "palettes" menu :

Code:
// Interface definitions
GSErrCode   __ACDLL_CALL   RegisterInterface (void)
{
   InitializeLanguageCodes();

   GSErrCode err = ACAPI_Register_Menu (12500, 12520, MenuCode_Palettes, MenuFlag_Default);



And this is my .grc for the menu :

Code:
'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.

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.

I have searched in the registry for some ID's, i have of course restared the computer. Nothing changes.

ShockedRolling EyesMad


Viewing all articles
Browse latest Browse all 564

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>