IUiCommandActionCustomize.Add

Syntax

Add(Name: String): IUiCommandAction;

Parameters

Name. Name of the action, which parameters are to be added to the collection.

Select one of the following reserved names as the parameter value:

Common Actions

Parameter Brief description
Open Opens an object.
Save Saves an object.
SaveAs Saves all changes to a new repository object.
OpenFile Opens an object from the file.
SaveFile Saves an object to the file.
Export Exports an object to supported formats.
Print Prints an object.
PrintPreview Object preview before printing.
EditData Edits object data.
SaveData Saves changed data.
EditOriginal Opens a dimension or a source dictionary for edit.
CtrlDimNoEdit The Editing command group in the context menu of dimension.

If required, it is possible to specify prefix of the objects, to which the settings are applied for the common actions:

Specific Actions

Parameter Brief description
Report.Modules Regular report modules.
Report.Map Inserts a new map into regular report.
Report.Mapselection Changes the current regular report map.
Express.Datasources Changes a list of express report data sources.
Express.Map Shows express report map.
Express.Mapselection Changes the current express report map.
Report.EditOriginal Opens a data source or source dimension dictionary of regular report for edit.
Express.EditOriginal Opens a data source or a source dimension dictionary of express report for edit.
AdHoc.EditOriginal Opens a data source or a source dimension dictionary for edit.

Description

The Add method adds a new action to the collection and returns parameters of the added action.

Comments

Action names are case-insensitive. If the added action already exists in the collection, an exception is thrown.

Example

Add a link to the UI system assembly.

Sub UserProc;
Var
    WinApp: IWinApplication;
    Command: IUiCommandActionCustomize;
    Action: IUiCommandAction;
Begin
    WinApp := WinApplication.Instance;
    Command := WinApp.CommandActionCustomize;
    Action := Command.Add("Save");
    Action.Enabled := False;
    Action.Visible := True;
    Action := Command.Add("Export");
    Action.Enabled := False;
    Action.Visible := True;
    Action := Command.Add("REPORT.MAP");
    Action.Visible := False;
    Action := Command.Add("EXPRESS.DATASOURCES");
    Action.Visible := False;
    Action := Command.Add("EXPRESS.EDITORIGINAL");
    Action.Visible := False;
End Sub UserProc;

On executing the example the action parameters are determined for repository objects:

Visibility of menu items is applied both for the context menu and for the toolbar.

See also:

IUiCommandActionCustomize