Expression(Attr: IDimAttribute): IExpression;
Attr - dimension attribute, by which connection is established.
The Expression property returns the expression of connection between source cube and destination cube dimensions.
Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier. A source cube and a destination cube have the dimensions Dim_1 and Dim_1_1 that are similar in structure. The Identifier index by attribute is created in each dimension.
Sub UserProc;
Var
MB: IMetabase;
Cube: ICalculatedCube;
Dim: ICalculatedCubeDimension;
Begin
MB := MetabaseClass.Active;
Cube := Mb.ItemById("Calc_Cube").Edit As ICalculatedCube;
Dim := Cube.Sources.Item(0).Dimensions.FindById("Dim_1");
Dim.Fixed := True;
Dim.Index := Dim.Dimension.Indexes.PrimaryIndex;
Dim.Expression(Dim.Dimension.Attributes.Id).AsString := "Dim_1_1.ID";
(Cube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the Dim_1 source dimension is fixed. This dimension is absent in the source cube and is bound with the Dim_1_1 dimension by the ID field.
See also: