IMsDimIteratorFilteredDimension.UseDestDimSelection

Syntax

UseDestDimSelection: Boolean;

Description

The UseDestDimSelection property determines whether selection of the corresponding data consumer dimension is used in filtering.

Comments

Available values:

The property is relevant for shared dimensions of data consumer and filter.

Example

Executing the example requires that the repository contains a modeling container with the MS identifier. The container includes a modeling problem with the PROBLEM identifier and a metamodel. The metamodel calculation chain should have a multidimensional cycle; the data consumer in use and the filter match.

Add links to the Cubes, Dimensions, Metabase, Ms system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Problem: IMsProblem;
    MModel: IMsMetaModel;
    Iter: IMsCalculationChainMultiDimIterator;
    IterByDataStub: IMsDimIterateByDataStub;
    Stub: IVariableStub;
    Dim: IDimensionModel;
    i, c: Integer;
Begin
    Mb := MetabaseClass.Active;
    // Open metamodel
    Problem := Mb.ItemByIdNamespace("PROBLEM", Mb.GetObjectKeyById("MS")).Edit As IMsProblem;
    MModel := Problem.MetaModel;
    // Get multidimensional iterator
    Iter := MModel.CalculationChain.Item(0As IMsCalculationChainMultiDimIterator;
    // Get cube from filtering by data
    IterByDataStub := Iter.IterateByData.Stubs.Item(0);
    Stub := IterByDataStub.Stub;
    // Select the UseDestDimSelection checkbox for all filter dimensions
    c := Stub.DimensionCount;
    For i := 0 To c - 1 Do
        Dim := Stub.Dimension(i);
        IterByDataStub.Dimension(Dim).UseDestDimSelection := True;
    End For;
    // Save changes
    MModel.MetabaseObject.Save;
End Sub UserProc;

After executing the example, all dimensions in filtering settings will use selection from data consumer.

See also:

IMsDimIteratorFilteredDimension