Problem.Run Command

Purpose

Starts modeling problem calculation.

Parameters of Use

None.

Application Features

The command can be used for modeling problems only.

Example

Executing the example requires that the repository contains a modeling container with the CONT identifier containing a modeling problem with the PROBLEM identifier. Create a form and place a button with the Button1 identifier on the form. Add links to the Metabase and Ui system assemblies.

The example is a handler of the OnClick event for Button1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    msKey: Integer;
    problObj: IMetabaseObjectDescriptor;
    Target: IUiCommandTarget;
Begin
    MB := MetabaseClass.Active;
    msKey := mb.GetObjectKeyById("CONT");
    problObj := mb.ItemByIdNamespace("PROBLEM", msKey);
    Target := WinApplication.Instance.GetObjectTarget(problObj);
    Target.Execute("Problem.Run"Null);
End Sub Button1OnClick;

Modeling problem calculation starts by clicking the button.

See also:

IUiCommandTarget.Execute