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 a calculated cube with the Calc_Cube identifier. A source cube and a destination cube have dimensions Dim_1 and Dim_1_1 that are similar in structure. In each dimension an index by attribute is created that is Identifier (Attribute identifier - Id).
Sub Main;
Var
MB: IMetabase;
Cube: ICalculatedCube;
MObj: IMetabaseObject;
Dim: ICalculatedCubeDimension;
Begin
MB := MetabaseClass.Active;
MObj := Mb.ItemById("Calc_Cube").Edit;
Cube := MObj 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";
MObj.Save;
End Sub Main;
After executing the example the Dim_1 source dimension is fixed. This dimension is absent in the source cube and is connected with the Dim_1_1 dimension by the ID field.
See also: