IRubricatorInstance.CreateDependenciesLookup

Syntax

CreateDependenciesLookup: IRubricatorFactorDependenciesLookup;

Description

The CreateDependenciesLookup method creates an object that searches for indicators dependencies in the time series database.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. The time series database must contain a formulas dictionary.

Sub UserProc;
Var
    Mb: IMetabase;
    RubInst: IRubricatorInstance;
    DepLoo: IRubricatorFactorDependenciesLookup;
    DepData: IRubricatorFactorDependencyData;
Begin
    Mb := MetabaseClass.Active;
    RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    DepLoo := RubInst.CreateDependenciesLookup;
    DepLoo.WhereCalendarPoint := DateTime.Parse("01.01.1980 00:00:00");
    DepLoo.WhereDependentFactorKey := 98544;
    DepLoo.Open;
    While (Not DepLoo.Eof) Do
        DepData := DepLoo.Current;
        Debug.WriteLine("Indicator key: " + DepData.FactorKey.ToString);
        Debug.WriteLine("Revision key: " + DepData.RevisionKey.ToString);
        Debug.WriteLine("Formula key: " + DepData.FormulaKey.ToString);
        Debug.WriteLine("Position in formula: " + DepData.Position.ToString);
        Debug.WriteLine("-----");
        DepLoo.Next;
    End While;
    DepLoo.Close;
End Sub UserProc;

Executing the example creates an object that searches for dependencies in the time series database according to the specified conditions. Information about found dependencies is displayed in the console window.

See also:

IRubricatorInstance