ParamValues: IMsModelParamValues;
The ParamValues property returns a collection of the parameter values of problem calculation using the selected method.
Executing the example requires that the repository contains a time series database with the FC_PARAM identifier. Modeling container of the database contains a model with the MODEL identifier that is included in a parameterized metamodel.
Sub UserProc;
Var
mb: IMetabase;
Catalog: IRubricator;
Transforms: IMetabaseObjectDescriptor;
Model: IMsModel;
parVals: IMsModelParamValues;
parVal: IMsModelParamValue;
i: Integer;
Calculation: IMsMethodCalculation;
Begin
mb := MetabaseClass.Active;
Catalog := mb.ItemById("FC_PARAM").Bind As IRubricator;
Transforms := Catalog.ModelSpace;
Model := mb.ItemByIdNamespace("MODEL", Transforms.Key).Edit As IMsModel;
Calculation := Model.Transform.CreateCalculation;
parVals := Calculation.ParamValues;
For i := 0 To parVals.Count - 1 Do
parVal := parVals.Item(i);
Debug.WriteLine("Parameter " + i.ToString + ":");
Debug.WriteLine(" parameter value: " + parVal.Value);
Debug.WriteLine(" default value: " + parVal.DefaultValue);
Debug.WriteLine(" whether parameter is hidden: " + parVal.Hidden.ToString);
Debug.WriteLine(" parameter identifier: " + parVal.Id);
Debug.WriteLine(" parameter key: " + parVal.Key.ToString);
Debug.WriteLine(" parameter name: " + parVal.Name);
Debug.WriteLine(" dictionary, to which parameter refers: " + parVal.LinkedObject.Name);
End For;
End Sub UserProc;
After executing the example metamodel parameters values, that influence model, are displayed in the console window.
See also: