There are several levels of controlling the appearance of an add-on command in the menu structure of the server application.
You can let the user organize the external command menus on the file-system level by creating subfolders in the Add-Ons folder. The commands which are contained in an .apx file put into such a subdirectory, will be mounted into a specially created menu in the main menu bar with the folder name as the menu title. Those subdirectories of the Add-Ons folder which do not contain loadable API tool extension or have their name put between parenthesis will not appear as an extra menu in the menu bar.
Add-ons located in the main level of the Add-Ons folder or mounted by the “Load Add-On…” command will be added to the Tools menu.
You can override this default rule by forcing your add-on commands into one of the predefined menu positions. Almost every standard Archicad menu has at least one entry point to mount external tools into. This position can be defined in the menuPosCode
parameter of the ACAPI_Register_Menu function. For example if you specify MenuCode_File
as the menuPosCode
, your add-on command will be inserted into the File menu after the Project Info menu item.
As a general limit none of the main menus can contain more than 63 items. If this limit would exceed by mounting an add-on, the server application opens a new submenu according to the forced menu code, and all the external commands mounted into that menu position will be reorganized into the newly inserted submenu.
Furthermore you can control the accessibility of your add-on commands by appending control codes at the end of each menu item string in the ‘STR#’ resource. This facility lets you enable your command above section/elevation type windows, disable above the floor plan window or when there are no elements selected in the active window. For more information see the Required Resources section.
If you decide to put a menu command into the Floating Palettes submenu of the Window menu (MenuCode_Palettes
) for controlling the visibility of your palette, please handle the Show/Hide All Palettes command as it is described in the Modeless Palettes section.