ShowMapLayerSelectionDialog Command

Purpose

It opens a dialog box to select map structure.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:

Value type Description
IPrxMap The map, for which the dialog box opens.

Application Features

The command can be used only for maps in regular reports. The result of command executing is the logical True if the OK button is clicked in the dialog, and the logical False if the Cancel button is clicked.

Example

Executing the example requires a form containing the ReportBox component with the ReportBox1 identifier and the UiReport component with the UiReport1 identifier, which is a data source for ReportBox1. The regular report with map must be loaded in the UiReport1 component.

Add a link to the UI system assembly.

Sub UserProc;
Var
    Report: IPrxReport;
    Tab: ITabSheet;
    Map: IPrxMap;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    Report := UiReport1.Report;
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Map := Tab.Objects.Item(0).Extension As IPrxMap;
    Target := WinApplication.Instance.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext;
    Context.Data := Map;
    Target.Execute("ShowMapLayerSelectionDialog", Context);
End Sub UserProc;

After executing the example the dialog box opens that is used to select map structure.

See also:

IUiCommandTarget.Execute