FindById(Id: Integer): ICubeMetaUpdateDictionaryRemaping;
Id - identifier of the source object.
The FindById method finds a correspondence in the collection based on the specified identifier of source object.
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 Main;
Var
mb: IMetabase;
RubUpdateEx: ICubeMetaUpdateEx;
XmlDoc: IXMLDOMDocument3;
el: IXmlDomElement;
i: Integer;
DictRemapings: ICubeMetaUpdateDictionaryRemapings;
DictRemap: ICubeMetaUpdateDictionaryRemaping;
Begin
mb := MetabaseClass.Active;
RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
XmlDoc := New DOMDocument60.Create;
XmlDoc.load("C:\FC_COPY.XML");
el := XmlDoc.selectSingleNode("root") As IXmlDomElement;
RubUpdateEx.LoadFromXml(el, mb);
DictRemapings := RubUpdateEx.DictionaryRemapings;
DictRemap := DictRemapings.FindById("UNITS");
If DictRemap <> Null Then
Debug.WriteLine(Object consumer: + DictRemap.Target.Id);
End If;
End Sub Main;
After executing the example parameters of time series database copying saved as XML code are loaded from the C:\FC_COPY.XML file. The system finds a correspondence for the source object with the UNITS identifier. If the correspondence is found, the consumer object identifier is displayed in the console window.
See also: