ShowModeller Command

Purpose

Opens express modeling dialog box for express report data.

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
IExpressModeller The object that contains express modeling settings.

Application Features

The command is used only for express modeling objects.

Fore Example

Executing the example requires a form, the Button1 button on it and the UiErAnalyzer component named UiErAnalyzer1. Some express report is connected to UiErAnalyzer1, the Active property is set to True. Add links to the Modeller, Ui system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ExpModel: IExpressModeller;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    ExpModel := UiErAnalyzer1.ErAnalyzer.CreateModeller;
    Target := WinApplication.Instance.GetPluginTarget("Modeller");
    Context := Target.CreateExecutionContext;
    Context.Data := ExpModel;
    Target.Execute("ShowModeller", Context);
End Sub Button1OnClick;

Clicking the button opens express modeling dialog box for the data of the express report connected to UiErAnalyzer1.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Modeller;
Imports Prognoz.Platform.Interop.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    WinApp: WinApplication = New WinApplicationClass_2();
    ExpModel: IExpressModeller;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    ExpModel := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer.CreateModeller();
    Target := WinApp.GetPluginTarget("Modeller");
    Context := Target.CreateExecutionContext();
    Context.Data := ExpModel;
    Target.Execute("ShowModeller", Context, Null);
End Sub;

See also:

IUiCommandTarget.Execute