ItemByDimension(Dimension: IDimensionModel): IAutoCubeDimension;
Dimension - source cube dimension connected with dimension in the automatic cube.
The ItemByDimension property returns the automatic cube dimensions that are connected with the source cube dimension.
If the Dimension dimension is connected to neither of automatic cube dimensions, the property returns Null.
Executing the example requires that the repository contains an automatic cube with the AUTO_CUBE identifier.
Sub Main;
Var
MB: IMetabase;
AutoCub: IAutoCube;
SourceDim: IDimensionModel;
Dim: IAutoCubeDimension;
Begin
MB := MetabaseClass.Active;
AutoCub := MB.ItemById("AUTO_CUBE").Bind As IAutoCube;
SourceDim := AutoCub.Source.Cube.Dimensions.Item(0);
Dim := AutoCub.Dimensions.ItemByDimension(SourceDim);
If Dim <> Null Then
Debug.WriteLine((Dim.Dimension As IMetabaseObject).Name);
Else
Debug.WriteLine("Not connected");
End If;
End Sub Main;
After executing the example, if the first source cube dimension is connected in any way with automatic cube dimension, the name of the corresponding dimension consumer is displayed.
See also: