IMsModelCalculation.ParamValues

Syntax

ParamValues: IMsModelParamValues;

Description

The ParamValues property returns the collection of values of model calculation parameters.

Example

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: IMsModelCalculation;

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.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;

Model.Execute(Calculation, -1);

(Model As IMetabaseObject).Save;

End Sub Main;

After executing the example metamodel parameters values, that influence model, are displayed in the console window. After this the model is calculated.

See also:

IMsModelCalculation