Archicad C++ API
About Archicad add-on development using the C++ API.

How to create menu on one level with "File", "Edit" etc?

Anonymous
Not applicable
My .grc file has next content:

'STR#' 32500 "Strings for the Menu" {
/* [   ] */     "Menu name"
/* [   1] */	    "item 1"
/* [   2] */	    "item2"
}
and menu was placed as submenu of "Options".

How can I move my menu one level up? What can I do with "32500" number?

Thanks
5 REPLIES 5
Ralph Wessel
Mentor
equilibrium wrote:
...menu was placed as submenu of "Options".
How can I move my menu one level up? What can I do with "32500" number?
You can specify the menu position with the APIMenuCodeID passed with the call to ACAPI_Register_Menu. If I understand your intentions correctly, I think you want MenuCode_UserDef.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
You are right, Ralph. Thanks
Anonymous
Not applicable
I was moved my menu on top level and now have next menu:

MyMenu
`SubMenu
``SubSubMenu1
``SubSubMenu2
``...
``SubSubMenuN
But I want to create menu like this:

MyMenu
`SubMenu1
`SubMenu2
`...
`SubMenuN
One way - it's creation of N 'STR#' sections in my .grc file like this:

'STR#' 32500 "Strings for the Menu" {
/* [   ] */     "MyMenu"
/* [   1] */	    "SubMenuN"
}
Than register them all and use own MenuHandler for each SubMenu.
But it's unwieldy way - I should to create new MenuHandler when add new SubMenu anytime.

Can you suggest more acceptable way? Thanks
Ralph Wessel
Mentor
equilibrium wrote:
I was moved my menu on top level and now have next menu: One way - it's creation of N 'STR#' sections in my .grc file like this:

'STR#' 32500 "Strings for the Menu" {
/* [   ] */     "MyMenu"
/* [   1] */	    "SubMenuN"
}
Than register them all and use own MenuHandler for each SubMenu.
But it's unwieldy way - I should to create new MenuHandler when add new SubMenu anytime. Can you suggest more acceptable way? Thanks
No - that's the way it works.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
It's really bad to create own description in .grc file for each first level submenu item.


Thanks a lot, Ralph