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 into a parameterized metamodel.
Sub Main;
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( is the parameter hidden: + parVal.Hidden.ToString);
Debug.WriteLine( identifier of parameter: + parVal.Id);
Debug.WriteLine( key of parameter: + parVal.Key.ToString);
Debug.WriteLine( name of parameter: + parVal.Name);
Debug.WriteLine( dictionary, to which the parameter refers: + parVal.LinkedObject.Name);
End For;
End Sub Main;
After executing the example metamodel parameters values, that influence model, are displayed in the console window.
See also: