IRubricatorInstance.GetMemberFactData

Syntax

GetMemberFactData(Member: IMetaMember ; [Options: DictionaryGetDataOptions = 0]): IRubricatorFactData;

Parameters

Member. Hierarchy element.

Options. Parameter of getting data. Optional parameter. Default value -  DictionaryGetDataOptions.None  - getting data for reading.

Description

The GetMemberFactData method returns data of factors dictionary based on the specified hierarchy element.

Example

Executing the example requires a form, a button located on it, the MetaAttributesTreeList component with the MetaAttributesTreeList1 identifier. The MetaAttributesBreadcrumb component with the MetaAttributesBreadcrumb1 identifier must be connected to this component. MetaAttributesBreadcrumb1 must be set up to work with the time series database.

Click the button to execute the example. Before executing the example select one factor in the MetaAttributesTreeList1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

memb: IMetaMember;

RubInst: IRubricatorInstance;

FactData: IRubricatorFactData;

Revi: IRubricatorRevision;

DataMembers: IMetaDataMembers;

DataMember: IMetaDataMember;

i: Integer;

Begin

Memb := MetaAttributesTreeList1.SelectedMembers.Current;

RubInst := MetaAttributesBreadcrumb1.Rubricator;

Revi := RubInst.OpenRevision("GetMemberFactData");

FactData := RubInst.GetMemberFactData(Memb, DictionaryGetDataOptions.Create);

Debug.WriteLine("FactorKey = " + FactData.FactorKey.ToString);

DataMembers := FactData.Record.Members;

For i := 0 To DataMembers.Count - 1 Do

DataMember := DataMembers.Item(i);

Debug.WriteLine(DataMember.Attribute.Id + " = " + DataMember.Value);

End For;

End Sub Button1OnClick;

After executing the example attributes values of the selected factor are displayed in the console window.

See also:

IRubricatorInstance