IMetaDictionaryDataInfo.IsGroupActive

Fore Syntax

IsGroupActive(Group: IMetaAttributeGroup): Boolean;

Fore.NET Syntax

IsGroupActive(Group: Prognoz.Platform.Interop.Rds.IMetaAttributeGroup): boolean;

Parameters

Group. A group of time series database attributes.

Description

The IsGroupActive method returns whether factor is included in the specified group.

Comments

If IsGroupActive returns True, time series is included in the specified group.

The IMetaDictionaryDataInfo.IsAttributeActive method returns whether a specified group attribute is available for the time series.

Fore Example

Executing the example requires a time series database with the FC_GROUPS identifier that contains a group attribute. Add links to the Rds, Metabase, Cubes system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    Rub: IRubricator;
    RubrIn: IRubricatorInstance;
    Dic: IMetaDictionary;
    i: Integer;
    key: Array Of Integer;
    Grp: IMetaAttributeGroup;
    FactsLookup: IRubricatorFactsLookup;
    FactData: IRubricatorFactData;
    FactInfo: IMetaDictionaryDataInfo;
Begin
    mb := MetabaseClass.Active;
    RubDesc := mb.ItemById("FC_GROUPS");
    Rub := RubDesc.Bind As IRubricator;
// Receive database  time series  dictionary
    Dic := (Rub.Facts As IMetabaseObject).Edit As IMetaDictionary;
// Receive the first group of dictionary attributes
    Grp := Dic.Groups.Item(0);
// Receive array of time series keys
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    FactsLookup := RubrIn.CreateFactsLookup;
    i := FactsLookup.LookupFactors.Length;
    key := New Integer[i];
    key := FactsLookup.LookupFactors;
// Receive time series that are included in the first group of attributes
    For Each i In key Do
        FactData := RubrIn.GetFactData(i);
        FactInfo := FactData As IMetaDictionaryDataInfo;
        If FactInfo.IsGroupActive(Grp) Then
            Debug.WriteLine(FactData.Mnemo);
        End If;
    End For;
End Sub UserProc;

After executing the example, the mnemonics of factors, the group attribute value of which can be changed, are displayed in the console window.

Fore.NET Example

Executing the example requires a time series database with the FC_GROUPS identifier that contains a group attribute.

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;
    Dic: IMetaDictionary;
    i: integer;
    key: System.Array;
    Grp: IMetaAttributeGroup;
    FactsLookup: IRubricatorFactsLookup;
    FactData: IRubricatorFactData;
    FactInfo: IMetaDictionaryDataInfo;
Begin
    mb := Params.Metabase;
    RubDesc := mb.ItemById["FC_GROUPS"];
    Rub := RubDesc.Bind() As IRubricator;
// Receive database  time series  dictionary
    Dic := (Rub.Facts As IMetabaseObject).Edit() As IMetaDictionary;
// Receive the first group of dictionary attributes
    Grp := Dic.Groups.Item[0];
// Receive array of time series keys
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    FactsLookup := RubrIn.CreateFactsLookup();
    key := New Integer[FactsLookup.LookupFactors().Length];
    key := FactsLookup.LookupFactors();
// Receive time series that are included in the first group of attributes
    For Each i In key Do
        FactData := RubrIn.GetFactData(i As uinteger, DictionaryGetDataOptions.dgdoNone);
        FactInfo := FactData As IMetaDictionaryDataInfo;
        If FactInfo.IsGroupActive(Grp) Then
            System.Diagnostics.Debug.WriteLine(FactData.Mnemo);
        End If;
    End For;
End Sub;

After executing the example the mnemonics of factors, the group attribute value of which can be changed, are displayed in the console window.

See also:

IMetaDictionaryDataInfo