IRubricatorCubeDestination.MakeDefault

Fore Syntax

MakeDefault;

Fore.NET Syntax

MakeDefault();

Description

The MakeDefault method sets this display version of time series database as a default display version.

Comments

To get whether the display version is a default version, use the ICubeModelDestination.IsDefault property.

Fore Example

Executing the example requires that the repository contains a time series database with the TSDB identifier.

Add links to the Cubes and Metabase system assemblies.

Var
    mb: IMetabase;
    TSDB: IRubricator;
    Cube: ICubeModel;
    Dest: IRubricatorCubeDestination;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get time series database
    TSDB := MB.ItemById("TSDB").Edit As IRubricator;
    // Present time series database as a cube model
    Cube := TSDB As ICubeModel;
    // Get the first display option
    Dest := Cube.Destinations.Item(0As IRubricatorCubeDestination;
    // Set the display option as a default option
    Dest.MakeDefault;
    // Save changes
    (TSDB As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the time series database display version is used as a default display version.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Cubes;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    TSDB: IRubricator;
    Cube: ICubeModel;
    Dest: IRubricatorCubeDestination;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Get time series database
    TSDB := MB.ItemById["TSDB"].Edit() As IRubricator;
    // Present time series database as a cube model
    Cube := TSDB As ICubeModel;
    // Get the first display option
    Dest := Cube.Destinations.Item[0As IRubricatorCubeDestination;
    // Set the display option as a default option
    Dest.MakeDefault();
    // Save changes
    (TSDB As IMetabaseObject).Save();
End Sub;

See also:

IRubricatorCubeDestination