Load Menu Groups

AutoCAD ActiveX

 
Load Menu Groups
 
 
 

Menu groups are loaded into AutoCAD using the Load method. For example, the following code loads the customization file acad.cui:

ThisDrawing.Application.MenuGroups.Load "acad.cui"

When using the Load method, set the BaseMenu parameter to TRUE to load a new menu group to the menu bar. This will load the menu group as a base menu in the same manner as the MENU command in AutoCAD.

To load a new menu group as a partial menu, omit the BaseMenu parameter. This will load the menu group in the same manner as the MENULOAD command in AutoCAD. Once loaded into the MenuGroups collection, partial menus can be inserted into the menu bar by using the InsertMenuInMenuBar method or the InsertInMenuBar method.

Once a menu group has been loaded, all the menus and toolbars defined by that menu group are available for use. You can

  • Add new menus to the menu bar
  • Remove menus from the menu bar
  • Rearrange menus on the menu bar
  • Add new items to an existing menu or toolbar
  • Remove items from an existing menu or toolbar
  • Create new menus and toolbars
  • Float or dock toolbars
  • Enable or disable menu and toolbar items
  • Check or uncheck a menu item
  • Change the tag, label, or help string of a menu or toolbar item
  • Reassign the macros associated to a menu or toolbar item
NoteYou can only edit popup menus and toolbars using ActiveX Automation. However, you can use ActiveX Automation to load and unload other menu types such as image tile menu items, screen menus, or tablet menus.