IRdsDictionary.Open

Syntax

Open(Values: IRdsParamValues): IRdsDictionaryInstance;

Parameters

Values. Values of dictionary parameters, in accordance to which opening is executed.

Description

The Open method opens an MDM dictionary.

Comments

A dictionary opens with regard to the parameters passed in the Values parameter.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier. The dictionary has one parameter.

Sub Main;

Var

MB: IMetabase;

ParamsVal: IRdsParamValues;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

Element: IRdsDictionaryElement;

i: Integer;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;

ParamsVal := Dict.Params.CreateValues;

ParamsVal.Item(0).Value := "1";

DictInst := Dict.Open(ParamsVal);

Elements := DictInst.Elements;

For i := 0 To Elements.Count - 1 Do

Element := Elements.Item(i);

Debug.WriteLine(Element.Name);

End For;

End Sub Main;

After executing the example an object that controls parameter values is created. With a specified parameter value a dictionary is opened, and values of the Name attribute are displayed in the console for all received dictionary elements.

See also:

IRdsDictionary