VariableStubs(Kind: MsVariableKind): IVariableStubList;
Kind. The type of variables that should be obtained.
The VariableStubs property returns a collection of variables, which data is used for problem calculation. The variable type is determined by the Kind parameter.
Sub Main;
Var
MB: IMetabase;
Problem: IMsProblem;
i: Integer;
Begin
MB := MetabaseClass.Active;
Problem := MB.ItemByIdNamespace("PROBLEM_1", MB.ItemById("KONT_MODEL").Key).Bind As IMsProblem;
For i := 0 To Problem.VariableStubs(MsVariableKind.All).Count - 1 Do
Debug.WriteLine((Problem.VariableStubs(MsVariableKind.All).Item(i) As IMetabaseObject).Name);
End For;
End Sub Main;
After executing the example the list of variables is displayed in the console window. The data of variables is used on calculating a problem with the PROBLEM_1 identifier.
See also: