GetDimension(DimensionObj: IMetabaseObject): IDimInstance;
DimensionObj. Repository dictionary.
The GetDimension method returns data of the specified dictionary from cache.
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: