Dimensions: ICubeSegmentDimensions;
The Dimensions property returns the collection of cube segment dimensions.
A segment can have its own list of dimensions, which are a subset of all dimensions of the segment container. A segment is applied to the cubes, which include the same dimensions included in the current Dimensions collection.
Executing the example requires that the repository contains a segment container with the SEG_CONTAINER identifier.
Add links to the Cubes and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
SegContainer: ICubeSegmentContainer;
Segments: ICubeSegments;
Segment: ICubeSegment;
Begin
Mb := MetabaseClass.Active;
SegContainer := Mb.ItemById("SEG_CONTAINER").Bind As ICubeSegmentContainer;
Debug.WriteLine("---Container dimensions---");
ShowDimsInfo(SegContainer.Dimensions);
Segments := SegContainer.GetAllSegments;
Debug.WriteLine("---Segment dimensions---");
For Each Segment In Segments Do
Debug.WriteLine("Segment: " + (Segment As IMetabaseObject).Name);
ShowDimsInfo(Segment.Dimensions);
End For;
End Sub UserProc;
Sub ShowDimsInfo(Dims: ICubeSegmentDimensions);
Var
Dim: ICubeSegmentDimension;
MObj: IMetabaseObject;
Begin
Debug.Indent;
For Each Dim In Dims Do
MObj := Dim.Dimension As IMetabaseObject;
Debug.WriteLine(MObj.Name + '(' + MObj.Id + ')');
End For;
Debug.Unindent;
End Sub ShowDimsInfo;
After executing the example the development environment console displays information about the dimensions added to the segment container and about the dimensions of each segment.
See also: