Control the Display of Command Items
 
 
 
Bottom of the Page

The way a menu or ribbon button item is displayed indicates its availability in the program. A menu or ribbon button item can be displayed as:

Ribbon button items do not display a check mark when marked; only a border is displayed.

NoteTo disable or mark ribbon button items, the “~” or “!.” sequence cannot be placed before a command name explicitly; it must be inside a DIESEL expression.

Gray Out (Disable) Menu or Ribbon Button Items

You gray out a menu or ribbon button item by doing one of the following:

Ribbon button items only support the use of DIESEL string expressions. For more information about using DIESEL expressions, see DIESEL Expressions in Macros. When grayed out, the macro and submenus associated with the menu or ribbon button item are made inaccessible.

In the following example, the tilde (~) is placed at the beginning of the Copy Link command label in the Name cell of the Properties pane.

Following is the resulting Copy Link command grayed out in the Edit menu.

DIESEL string expressions are used to conditionally disable or enable a menu or ribbon button item each time they are displayed. For example, the DIESEL string expression in the Macros cell of the Properties pane disables the MOVE command while any other 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 application. For examples, see Reference Pull-Down or Shortcut Menus.

Mark Menu or Ribbon Button Items

You can mark a menu or ribbon button item by doing one of the following:

Ribbon button items only support the use of DIESEL string expressions. A menu or ribbon button item is marked in one of two ways:

Following is an example of the Edit menu with the OLE Links command marked with a check mark and the Copy Link command's image marked with a border:

Menu items can and ribbon button items must contain DIESEL string expressions to conditionally mark them each time they are displayed. When the following DIESEL string is added to the Macros cell for the applicable command in the Properties pane, a check mark is placed to the left of the menu item whose related system variable is currently enabled.

$(if,$(getvar,orthomode),!.)Ortho^O
$(if,$(getvar,snapmode),!.)Snap^B
$(if,$(getvar,gridmode),!.)Grid^G

The AutoLISP menucmd function can be used to mark labels from a macro or application. For examples, see Reference Pull-Down or Shortcut Menus.

Simultaneously Disable and Mark Command Items

You can mark and disable commands at the same time using either of the following formats:

~!. labeltext
!.~ labeltext

The tilde (~) is the special character code to disable a command and an exclamation point and period (!.) is the special character code to mark a command.

The tilde (~), exclamation point, and period (!.) are placed at the beginning of the Copy Link command label in the Name cell of the Properties pane. Following is the resulting Copy Link marked and grayed out in the Edit menu.

As with the previous examples, a DIESEL expression can be used to simultaneously disable and mark a command item.

See Also
Procedure
To gray out (disable) a command's menu or ribbon button label
To mark command's menu or ribbon button label
To simultaneously gray out (disable) and mark a command's menu or ribbon button label
Quick Reference
Commands