The way a menu item is displayed indicates its availability in the program.
A menu item can be displayed as:
You can gray out a menu item by doing one of the following:
When grayed out, the macro and submenus associated with the menu item are made inaccessible.
The following example disables the Copy Link menu item by adding a tilde (~) to the front of the value in the Name property.
The following is the result of adding a tilde (~) to the Name property for the Copy Link menu item that appears on the Edit menu.
DIESEL string expressions can be used to conditionally disable or enable a menu item each time they are displayed. For example, the DIESEL string expression in the Macros property of the Properties pane disables the MOVE command while another command is active.
$(if,$(getvar,cmdactive),~)MOVE^C^C_move
The AutoLISP menucmd function can also be used to disable and enable items from a macro or AutoLISP application. (Not available in AutoCAD LT.)
You can mark a menu item by doing one of the following:
A menu item is marked in one of two ways:
The following example shows the OLE Links menu item on the Edit menu marked with a check mark and the Copy Link menu item's image highlighted with a border around it.
DIESEL string expressions can be used to conditionally mark a menu item each time it is displayed. The following DIESEL string examples, when added to the Macros property of the Properties pane, place a check mark to the left of the menu item when the related system variable is enabled.
$(if,$(getvar,orthomode),!.)Ortho^O $(if,$(getvar,snapmode),!.)Snap^B $(if,$(getvar,gridmode),!.)Grid^G
You can mark and disable a menu item at the same time using either of the following formats:
~!.labeltext !.~labeltext
The tilde (~) and exclamation point followed by a period (!.) are placed at the beginning of the Copy Link command label in the Name property of the Properties pane. The following is the result of the Copy Link marked and grayed out in the Edit menu.