MnemoAttribute: String;
The MnemoAttribute property determines name of an attribute that contains mnemonic.
Executing the example requires that the repository contains a time series database with the FC_MN identifier.
Sub Main;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
DictInst: IMetaDictionaryInstance;
MetaDLookup: IMetaDictionaryLookup;
Atts: IMetaAttributes;
Mnemo: String;
i: Integer;
Res: Array Of Integer;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("FC_MN");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
DictInst := RubrIn.Facts;
MetaDLookup := DictInst.CreateLookup;
Atts := DictInst.Dictionary.Attributes;
Mnemo := Atts.FindByKind(MetaAttributeKind.Mnemo).Id;
MetaDLookup.WhereFactorMnemo := Afghanistan|BCA|Years;
If MetaDLookup.LookupKeys("FACTOR") <> Null Then
i := MetaDLookup.LookupKeys("FACTOR").Length;
Res := New Integer[i];
Res := MetaDLookup.LookupKeys("FACTOR");
For i := 0 To Res.Length - 1 Do
Debug.WriteLine(Res[i].ToString);
End For;
End If;
End Sub Main;
After executing the example an attribute that contains factor mnemonic is determined. Factors with the Afghanistan|BCA|Years mnemonic are searched, their keys are displayed in the console window.
See also: