IMsProblemCalculation.VariableStubs

Syntax

VariableStubs: IVariableStubList;

Description

The VariableStubs property returns the collection of variables, data of which is used in modeling problem calculation.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Problem: IMsProblem;
    CalcSett: IMsProblemCalculationSettings;
    Calculation: IMsProblemCalculation;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Problem := MB.ItemByIdNamespace("PROBLEM_1", MB.ItemById("KONT_MODEL").Key).Bind As IMsProblem;
    CalcSett := Problem.CreateCalculationSettings;
    Calculation := Problem.Calculate(CalcSett);
    For i := 0 To Calculation.VariableStubs.Count - 1 Do
        Debug.WriteLine((Calculation.VariableStubs.Item(i) As IMetabaseObject).Name);
    End For;
End Sub UserProc;

After executing the example the list of input and output variables is displayed in the console, which data is used in calculation of the problem with the PROBLEM_1 identifier.

See also:

IMsProblemCalculation