ICubeMetaUpdateDictionaryRemapings.FindByKey

Syntax

FindByKey(Key: Integer): ICubeMetaUpdateDictionaryRemaping;

Parameters

Key. Source object key.

Description

The FindByKey method finds a correspondence in the collection based on the specified key of source object.

Example

Executing the example requires the C:\FC_COPY.XML file that contains parameters of time series database copying as XML code. Parameters must be stored in the Root section.

Sub UserProc;
Var
    Mb: IMetabase;
    RubUpdateEx: ICubeMetaUpdateEx;
    XmlDoc: IXMLDOMDocument3;
    Element: IXmlDomElement;
    DictRemapings: ICubeMetaUpdateDictionaryRemapings;
    DictRemap: ICubeMetaUpdateDictionaryRemaping;
Begin
    Mb := MetabaseClass.Active;
    RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
    XmlDoc := New DOMDocument60.Create;
    XmlDoc.load("C:\FC_COPY.XML");
    Element := XmlDoc.selectSingleNode("root"As IXmlDomElement;
    RubUpdateEx.LoadFromXml(Element, Mb);
    DictRemapings := RubUpdateEx.DictionaryRemapings;
    DictRemap := DictRemapings.FindByKey(67);
    If DictRemap <> Null Then
        Debug.WriteLine("Consumer object: " + DictRemap.Target.Id);
    End If;
End Sub UserProc;

After executing the example parameters of time series database copying are loaded from the XML file. The system finds a correspondence for the source object with the 67 key. If correspondence is found, the console window displays consumer object identifier.

See also:

ICubeMetaUpdateDictionaryRemapings