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

Multiple addons under common sub-menu

dushyant
Enthusiast

Hello,

 

Is there a way to have multiple addons under the same sub-menu in a user-defined menu?

For example:
MainCustomMenu > SubMenuABC > Addon1

and another addon:
MainCustomMenu > SubMenuABC > Addon2

For me Archicad creates two sub-menus of the same name "SubMenuABC" for each of the addons.

 

The menu resource ID in both the addons is the same.

 

Thank you.

 

2 REPLIES 2

Addons can share a common parent menu, but the menu hierarchy can't be more than 3 levels deep. For example, all the Ci Tools add-ons are clustered under a common "Ci Tools" menu:

RalphWessel_0-1747754777761.png

The resources are written like this:

'STR#' 32500  "Menu items" {
/*[  ]*/ "CI Tools"
/*[  ]*/ "Metadata"
/*[ 1]*/"Show metadata palette…^E3^EL^ES^ED^EE^EI^EW^ET^32500"
/*[ 2]*/"-"
/*[ 3]*/"Metadata Help^ED^EW^EE^EI^ES^32501"
}

 Keep in mind that the menu hierarchy can't be more than 3 levels deep.

Ralph Wessel BArch
Central Innovation
dushyant
Enthusiast

Thanks for your reply @Ralph Wessel ! 
It seems what I was looking for is the MenuFlag option: MenuFlag_InsertIntoSame in ACAPI_MenuItem_RegisterMenu().

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!