IInMemManager.GetDimension

Syntax

GetDimension(DimensionObj: IMetabaseObject): IDimInstance;

Parameters

DimensionObj. Repository dictionary.

Description

The GetDimension method returns data of the specified dictionary from cache.

Example

Executing the example requires that the repository contains a dictionary with the D_FACTS identifier.

Add links to the Cubes, Dimensions system assemblies. Metabase.

Sub UserProc;
Var
    Mb: IMetabase;
    MObj: IMetabaseObject;
    InMem: IInMemManager;
    DimInst: IDimInstance;
Begin
    Mb := MetabaseClass.Active;
    MObj := Mb.ItemById(
"D_FACTS").Bind;
    InMem := 
New InMemManager.Create;
    
If InMem.CheckHasDimension(MObj) Then
        DimInst := InMem.GetDimension(MObj);
        Debug.WriteLine(
"Number of elements: " + DimInst.Elements.Count.ToString);
    
End If;
End Sub UserProc;

On executing the example, it will be checked if cache contains data for the specified dictionary. If cache contains data, the development environment console displays the number of cached dictionary elements.

See also:

IInMemManager