Mnemo: String;
Mnemo: string;
The Mnemo property determines a time series mnemonic.
If the database does not use mnemonics, that is, IRubricator.HasMnemonics is set to False, an empty value is returned if the user gets the Mnemo property, and the specified value is ignored if the user tries to set the property.
Executing the example requires that the repository contains a time series database with the OBJ_FC identifier. Add links to the Metabase, Cubes system assemblies.
Sub UserProc;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
Rub: IRubricator;
RubrIn: IRubricatorInstance;
Loo: IRubricatorFactsLookup;
i: Integer;
Factors: Array Of Integer;
FactD: IRubricatorFactData;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("OBJ_FC");
Rub := RubDesc.Bind As IRubricator;
If Rub.HasMnemonics Then
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
Loo := RubrIn.CreateFactsLookup;
Factors := Loo.LookupFactors;
For i := 0 To Factors.Length - 1 Do
FactD := RubrIn.GetFactData(Factors[i]);
Debug.WriteLine(FactD.Mnemo);
End For;
Else
Debug.WriteLine("Mnemonics are not used");
End If;
End Sub UserProc;
After executing the example mnemonics of all factors in the database are displayed in the console window.
Executing the example requires that the repository contains a time series database with the OBJ_FC identifier.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
Rub: IRubricator;
RubrIn: IRubricatorInstance;
Loo: IRubricatorFactsLookup;
i: Integer;
Factors: System.Array;
FactorKey: integer;
FactD: IRubricatorFactData;
Begin
Mb := Params.Metabase;
RubDesc := MB.ItemById["OBJ_FC"];
Rub := RubDesc.Bind() As IRubricator;
If Rub.HasMnemonics Then
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
Loo := RubrIn.CreateFactsLookup();
Factors := Loo.LookupFactors();
For i := 0 To Factors.Length - 1 Do
FactorKey := Factors[i] As integer;
FactD := RubrIn.GetFactData(FactorKey As uinteger, DictionaryGetDataOptions.dgdoNone);
System.Diagnostics.Debug.WriteLine(FactD.Mnemo);
End For;
Else
System.Diagnostics.Debug.WriteLine("Mnemonics are not used");
End If;
End Sub;
After executing the example the console window displays mnemonics of all factors in the database.
See also: