C++
int acedMenuCmd( const ACHAR * str );
File
acedads.h
Description
This function issues menu commands, or sets and retrieves menu item status.
The acedMenuCmd() function can activate a specified submenu of the current AutoCAD customization file. This function can also force the display of menus or gray out menu items.
Creating and adding specific menus to the pull-down menus on the menu bar is done dynamically. AutoCAD can also load a partial customization (CUI) file to an existing loaded menu. A partial CUI file uses the same syntax.
Allowed values for the menuarea portion of str are:
String | Corresponding Area |
---|---|
B1-B4 | BUTTONS menus 1 through 4. |
A1-A4 | AUX menus 1 through 4. |
P0-P16 | Pull-down (POP) menus 0 through 16. |
I | Image tile menus. |
S | SCREEN menu. |
T1-T4 | TABLET menus 1 through 4. |
M | DIESEL string expressions. |
Gmenugroup.elementID | A menugroup name (note the "G" prefix) and a element ID. |
For menus, the value portion of str uses the syntax menugroup.alias.For example, the following code grays out the "Line" menu item in POP1:
acedMenuCmd( "Gsample.ID_Line = ~" );
The syntax menuarea=+value will insert rather than replace a pull-down menu. For example, the following code inserts the pull-down menu MYMENU in the MYGROUP partial CUI file at the tenth index on the menu bar:
acedMenuCmd( "P10=+MYGROUP.MYMENU" );
When you call acedMenuCmd() with one of the query forms, it returns a value of RTKWORD. Your program must then call acedGetInput() to retrieve the string.
If acedMenuCmd() succeeds, it returns RTNORM. It returns RTKWORD in response to a menu-item query. Otherwise, it returns an error code.
Parameters
Parameters | Description |
---|---|
str | Input name-value pair that specifies a menu area and the value to assign to that menu area, in the format menuarea=value |