ILanerSerie.ScenarioDimension

Fore Syntax

ScenarioDimension: IDimInstance;

Fore.NET Syntax

ScenarioDimension: Prognoz.Platform.Interop.Dimensions.IDimInstance;

Description

The ScenarioDimension property returns scenario dimension of series.

Comments

To get calendar dimension of series, use the ILanerSerie.CalendarDim property.

Fore Example

Executing the example requires that the repository contains a workbook with the WORKBOOK_SCENARIO identifier that contains several series. The time series database that is a data source for the workbook must contain more than one scenario.

Add links to the Dimensions, Express, Laner and Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    WbkObj: IMetabaseObject;
    EaxAn: IEaxAnalyzer;
    Laner: ILaner;
    CalcSerie: ILanerCalculateSerie;
    ScenDim: IDimInstance;
    Attributes: IDimAttributesInstance;
    ScenKey: Integer;
Begin
    // Get workbook
    mb := MetabaseClass.Active;
    WbkObj := mb.ItemById("WORKBOOK_SCENARIO").Edit;
    EaxAn := WbkObj As IEaxAnalyzer;
    // Get object to set up workbook
    Laner := EaxAn.Laner;
    // Get the first series of wokbook
    CalcSerie := Laner.Series.Item(0As ILanerCalculateSerie;
    // Get scenario dimension of series
    ScenDim := CalcSerie.ScenarioDimension;
    // Get key of the second scenario in scenario dimension
    Attributes := ScenDim.Attributes;
    ScenKey := Attributes.item(1).Value(1);
    CalcSerie.ScenarioKey := ScenKey;
    // Save changes
    WbkObj.Save;
End Sub UserProc;

After executing the example the scenario for the first workbook series is changed.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Laner;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    WbkObj: IMetabaseObject;
    EaxAn: IEaxAnalyzer;
    Laner: ILaner;
    CalcSerie: ILanerCalculateSerie;
    ScenDim: IDimInstance;
    Attributes: IDimAttributesInstance;
    ScenKey: integer;
Begin
    // Get workbook
    mb := Params.Metabase;
    WbkObj := mb.ItemById["WORKBOOK_SCENARIO"].Edit();
    EaxAn := WbkObj As IEaxAnalyzer;
    // Get object to set up workbook
    Laner := EaxAn.Laner;
    // Get the first series of wokbook
    CalcSerie := Laner.Series.Item[0As ILanerCalculateSerie;
    // Get scenario dimension of series
    ScenDim := CalcSerie.ScenarioDimension;
    // Get key of the second scenario in scenario dimension
    Attributes := ScenDim.Attributes;
    ScenKey := Attributes.item[1].Value[1As integer;
    CalcSerie.ScenarioKey := ScenKey As uinteger;
    // Save changes
    WbkObj.Save();
End Sub;

See also:

ILanerSerie