SetMenuItemEnabled command

The SetMenuItemEnabled command enables or disables the menu item or multiple items from the specified IDs range. An application grays a disabled menu item to provide a visual cue to the user that a command is not available.

 

Syntax

Integer=MenuItemID

PluginSet("PlugIn","Integer")

PluginRun("PlugIn","SetMenuItemEnabled")

or

String$='IDsRange1, IDsRange2, ..., IDsRangeN'

PluginSet("PlugIn","String$")

PluginRun("PlugIn","SetMenuItemEnabled")

Parameters

MenuItemID

[in] Associated with menu item unique identifier or submenu handle if menu item opens submenu. If this value is positive then command enables menu item, if it is negative then command disables menu item.

IDsRange

[in] Used to perform quick operation on multiple items. IDs range is a string value that could be represented in this way: 'range_start % range_end' where range_start and range_end are menu item identifiers. IDs range can be degenerated - simply represented only by one identifier (submenu handle or item identifier): 'range_start'. To disable all items from IDs range the range_start value should be negative: '-range_start % range_end'.