ICubeMetaUpdateDictionaryRemapings.FindById

Syntax

FindById(Id: Integer): ICubeMetaUpdateDictionaryRemaping;

Parameters

Id. Source object identifier.

Description

The FindById method finds a correspondence in the collection based on the specified identifier 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.FindById("UNITS");
    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 correspondence for the source object with the UNITS identifier. If correspondence is found, the console window displays consumer object identifier.

See also:

ICubeMetaUpdateDictionaryRemapings