Skip to main content

CommandLocation

The CommandLocation enumeration specifies the location for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.

Supported in M-Files Client version 25.10 and later.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.

Runtime Access

This enumeration is available at runtime on the MFiles global object. Access enum values using MFiles.CommandLocation.<value>.

Example:

const value = MFiles.CommandLocation.Undefined;

See also: MFiles Global Object