FindByKey(Key: Integer): ICubeMetaUpdateDictionaryRemaping;
Key - key of the source object.
The FindByKey method finds a correspondence in the collection based on the specified key 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.FindByKey(67);
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 67 key. If correspondence is found, the object consumer identifier is displayed in the console window.
See also: