CubeDimensions(Cube: String; Dimension: String): IDalCursor;
Cube. Physical name of the cube.
Dimension. Physical name of the cube dimension.
The CubeDimensions method returns the cursor, containing system information about specified dimension of the selected cube.
The obtained cursor contains information about all the dimensions, contained in the ADOMD catalog, if the Cube and Dimension parameters are not specified. The cursor contains information about all the dimensions with specified name, contained in any cubes of the ADOMD catalog, if the Cube parameter is not specified.
A specific record is added to the cursor to split the information by dimensions. First field in this record has no name and the dimension number is used as the field value.
Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier. The cube with the Test physical name is contained in the catalog and the dimension with the Dim_1 name is the part of this cube structure.
Sub UserProc;
Var
MB: IMetabase;
Catalog: IAdoMdCatalogInstance;
Connection: IAdoMdConnection;
Dim: IDalCursor;
CFields: IDalCursorFields;
CField: IDalCursorField;
i: Integer;
Begin
MB := MetabaseClass.Active;
Catalog := MB.ItemById("ADOMDTest").Open(Null) As IAdoMdCatalogInstance;
Connection := Catalog.Connection;
Dim := Connection.CubeDimensions("Test", "TestDim");
CFields := Dim.Fields;
While Not Dim.Eof Do
For i := 0 To CFields.Count - 1 Do
CField := CFields.Item(i);
Debug.WriteLine(CField.Name + " | " + CField.Value);
End For;
Dim.Next;
End While;
End Sub UserProc;
After executing the example the user gets a cursor that contains information on the specified dimension of ADOMD cube. This information is displayed in the development environment console.
See also: