IAutoCubeUpdateFilter.ParamsValues

Syntax

ParamsValuesIMetabaseObjectParamValues;

Description

The ParamsValues property determines values of automatic cube parameters.

Example

Executing the example requires that the repository contains an automatic cube with the AUTOCUBE identifier. The cube has an integer parameter.

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

Sub UserProc;
Var
    Update: IMetabaseUpdate;
    CubeNode: IMetabaseUpdateDataObjectNode;
    Object: IMetabaseObject;
    Filter: IAutoCubeUpdateFilter;
    Sel: IDimSelection;
    ParamsVal: IMetabaseObjectParamValues;
    CubeInst: ICubeInstance;
    Mb: IMetabase;
Begin
    Mb := MetabaseClass.Active;
    Update := Mb.CreateUpdate;
    CubeNode := Update.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
    Object := Mb.ItemById("AUTOCUBE").Bind;
    CubeNode.Object := Object;
    CubeNode.Label := CubeNode.Object.Name;
    CubeNode.Method := MetabaseUpdateMethod.All;
    CubeNode.IncludeData := True;
    CubeNode.ExtendedParams := Object.CreateUpdateExParams;
    Filter := CubeNode.ExtendedParams As IAutoCubeUpdateFilter;
    ParamsVal:= Object.Params.CreateEmptyValues;
    ParamsVal.Item(0).Value := "100";
    Filter.ParamValues := ParamsVal;
    CubeInst := Object.Open(ParamsVal) As ICubeInstance;
    Filter.SelectionSet := CubeInst.Destinations.DefaultDestination.CreateDimSelectionSet;
    For Each Sel In Filter.SelectionSet Do
        If sel.Dimension.Ident = "CALENDAR" Then
            sel.SelectSiblings(0);
        Else
            Sel.SelectElement(0true);
        End If;
    End For;
    Update.SaveToFileNF("D:\Work\autocube.pefx");
End Sub UserProc;

After executing the example an update is created. An automatic cube will be included in the update, parameter values and selection will be determined for the cube.

See also:

IAutoCubeUpdateFilter