M-Files UI Extensibility Framework
GetCommandState Method
ICommands Interface : GetCommandState Method
The command id. Can be a builtin command enumerated value or custom command id.
Detailed command location to examine. Possible locations are enumerated.
If true, takes the built-in state of the command into account.
If true, takes the script-specified state of the command into account.
Description
Gets the command state for builtin or custom command in specified location.
Syntax
Visual Basic
Public Function GetCommandState( _
   ByVal command As Long, _
   ByVal location As CommandLocation, _
   ByVal includeBuiltInState As Boolean, _
   ByVal includeScriptSpecifiedState As Boolean _
) As CommandState
Parameters
command
The command id. Can be a builtin command enumerated value or custom command id.
location
ValueDescription
CommandLocation_AllRefers to all locations.
CommandLocation_ContextMenuRefers to the context menu and the Create button in the top pane.
CommandLocation_MainMenuRefers to the menu bar. Press Alt to show the menu bar in M-Files Desktop.
CommandLocation_TaskPaneRefers to the task area.
CommandLocation_UndefinedUndefined value.
Detailed command location to examine. Possible locations are enumerated.
includeBuiltInState
If true, takes the built-in state of the command into account.
includeScriptSpecifiedState
If true, takes the script-specified state of the command into account.
Return Type
The command state.
Remarks

Supported in M-Files 10.0.3911.3 and newer.

See Also

ICommands Interface  | ICommands Members