ICubeInstanceDestination.CreateExecutorO

Синтаксис Fore

CreateExecutorO(Options: Integer): ICubeInstanceDestinationExecutor;

Синтаксис Fore.NET

CreateExecutorO(Options: integer): Prognoz.Platform.Interop.Cubes.ICubeInstanceDestinationExecutor;

Параметры

Options. Варианты использования закэшированных данных для расчёта отстроенного куба. Варианты представлены в перечислении CubeInstanceDestinationExecutorOptions.

Описание

Метод CreateExecutorO создает объект, осуществляющий расчет результирующей матрицы куба с использованием параметров.

Комментарии

Для создания объекта, осуществляющего расчет результирующей матрицы куба, используйте ICubeInstanceDestination.CreateExecutor.

Пример Fore

Для выполнения примера в репозитории необходимо наличие куба с идентификатором «CUBE».

Добавьте ссылки на системные сборки: Cubes, Dimensions, Matrix, Metabase.

Sub UserProc;
Var
    MB: IMetabase;
    CubeInst: ICubeInstance;
    DefDest: ICubeInstanceDestination;
    SelSet: IDimSelectionSet;
    i: integer;
    DestExec: ICubeInstanceDestinationExecutor;
    Proxy: IMatrix;
    Iter: IMatrixIterator;
Begin
    MB := MetabaseClass.Active;
    CubeInst := MB.ItemById("CUBE").Open(NullAs ICubeInstance;
    DefDest := CubeInst.Destinations.DefaultDestination;
    SelSet := DefDest.CreateDimSelectionSet;
    For i := 0 To SelSet.Count - 1 Do
        SelSet.Item(i).SelectAll;
    End For;
    Debug.WriteLine("---------------Значения элементов-------------------");
    DestExec := DefDest.CreateExecutorO(CubeInstanceDestinationExecutorOptions.MatrixProxy);
    DestExec.PrepareExecute(SelSet);
    DestExec.PerformExecute(False);
    Proxy := DestExec.Matrix;
    Iter := Proxy.CreateIterator;
    Iter.Move(IteratorDirection.First);
    i := 0;
    While Iter.Valid Do
        Debug.WriteLine(i.ToString + " Iter.Value = " + Iter.Value);
        Iter.Move(IteratorDirection.Next);
        i := i + 1;
    End While;
End Sub UserProc;

После выполнения примера в окно консоли будут выведены значения элементов матрицы куба.

Пример Fore.NET

Необходимые требования и результат выполнения примера Fore.NET совпадают с примером Fore.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Matrix;

Public
 Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    CubeInst: ICubeInstance;
    DefDest: ICubeInstanceDestination;
    SelSet: IDimSelectionSet;
    i: integer;
    DestExec: ICubeInstanceDestinationExecutor;
    Proxy: IMatrix;
    Iter: IMatrixIterator;
Begin
    MB := Params.Metabase;
    CubeInst := MB.ItemById["CUBE"].Open(NullAs ICubeInstance;
    DefDest := CubeInst.Destinations.DefaultDestination;
    SelSet := DefDest.CreateDimSelectionSet();
    For i := 0 To SelSet.Count - 1 Do
        SelSet.Item[i].SelectAll();
    End For;
    System.Diagnostics.Debug.WriteLine("---------------Значения элементов-------------------");
    DestExec := DefDest.CreateExecutorO(CubeInstanceDestinationExecutorOptions.cideoMatrixProxy As Integer);
    DestExec.PrepareExecute(SelSet);
    DestExec.PerformExecute(False);
    Proxy := DestExec.Matrix;
    Iter := Proxy.CreateIterator();
    Iter.Move(IteratorDirection.itdFirst);
    i := 0;
    While Iter.Valid Do
        System.Diagnostics.Debug.WriteLine(i.ToString() + " Iter.Value = " + Iter.Value);
        Iter.Move(IteratorDirection.itdNext);
        i := i + 1;
    End While;
End Sub;

См. также:

ICubeInstanceDestination