CreateEmptyValues: IMetabaseObjectParamValues;
The CreateEmptyValues method creates a copy of parameter collection containing empty values.
Created copy can be filled in with required parameter values and can be further used to open object with this set of parameters. The obtained copy is not link and does not impact a set of object parameters.
Executing the example requires that the repository contains the Dim_1 dictionary that contains two parameters.
Sub UserProc;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
ParamVal: IMetabaseObjectParamValues;
Dict: IDimInstance;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("Dim_1");
ParamVal := MDesc.Params.CreateEmptyValues;
ParamVal.Item(0).Value := 1;
ParamVal.Item(1).Value := 10;
Dict := MDesc.Open(ParamVal) As IDimInstance;
Debug.WriteLine(Dict.Elements.Count);
End Sub UserProc;
After executing the example, the specified dictionary will be opened. Before opening an empty collection is created, then parameters values are assigned. Number of collection elements received after opening is displayed in the development environment console.
See also: