See below the example of viewing information about calculated cube structure: information about data sources, source dimensions and the calculated cube dimensions is displayed. The information is displayed in the development environment console. Executing the example requires that the repository contains a calculated cube with the CalculatedCube identifier. Add links to the Cubes, Dimensions, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Cube: ICalculatedCube;
CubeSource: ICalculatedCubeSource;
CubeDim: ICalculatedCubeDimension;
MDesc: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
Cube := MB.ItemById("CalculatedCube").Bind As ICalculatedCube;
//Information about calculated cube sources and their dimensions
For Each CubeSource In Cube.Sources Do
Debug.WriteLine("Source: " + CubeSource.Name + '(' + CubeSource.Id + ')');
Debug.WriteLine("Source dimensions:");
Debug.Indent;
For Each CubeDim In CubeSource.Dimensions Do
MDesc := CubeDim.Dimension As IMetabaseObjectDescriptor;
Debug.WriteLine(MetabaseClass.CommonClassName(MDesc.ClassId As MetabaseObjectClass) + ": " + MDesc.Name + '(' + MDesc.Id + ')');
End For;
Debug.Unindent;
End For;
//Information about calculated cube dimensions
Debug.WriteLine("Calculated cube dimensions:");
For Each CubeDim In Cube.Dimensions Do
MDesc := CubeDim.Dimension As IMetabaseObjectDescriptor;
Debug.Indent;
Debug.Write(MetabaseClass.CommonClassName(MDesc.ClassId As MetabaseObjectClass) + ": " + MDesc.Name + '(' + MDesc.Id + ". ");
If CubeDim.Fixed Then
Debug.WriteLine("Fixed");
Else
Debug.WriteLine("Non-fixed");
End If;
Debug.Unindent;
End For;
End Sub UserProc;
See also: