IMsMetaModelVisualController.ExtendRubricatorPeriod

Fore Syntax

ExtendRubricatorPeriod(StartDate: DateTime; EndDate: DateTime);

Fore.NET Syntax

ExtendRubricatorPeriod(StartDate: System.DateTime; EndDate: System.DateTime);

Parameters

StartDate. Calendar start date.

EndDate. Calendar end date.

Description

The ExtendRubricatorPeriod method extends boundaries of the calendar of internal time series database.

Comments

By default the calendar of the internal time series database starts in 1980 and ends in 2020.

Fore Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a modeling problem with the FILLMODEL identifier. This problem must contain an internal metamodel containing an internal time series database and a model.

Add links to the Metabase, Ms system assemblies.

Sub ExtendRubricatorPeriod;
Var
    mb: IMetabase;
    MsObj: IMetabaseObjectDescriptor;
    pr: IMsProblem;
    Meta: IMsMetaModel;
    MetaVisual: IMsMetaModelVisualController;
    StartDate, EndDate: DateTime;
Begin
    mb := MetabaseClass.Active;
    // Get modeling container
    MsObj := mb.ItemById("MS");
    // Get modeling problem
    pr := mb.ItemByIdNamespace("FILLMODEL", MsObj.Key).Bind As IMsProblem;
    // Get metamodel
    Meta := pr.MetaModel;
    MetaVisual := Meta.VisualController;
    StartDate := DateTime.Parse("01.01.1970");
    EndDate := DateTime.Parse("01.01.2020");
    MetaVisual.ExtendRubricatorPeriod(StartDate, EndDate);
End Sub ExtendRubricatorPeriod;

Example execution result: Calendar bounds will be extended for the internal time series database of the metamodel.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    MsObj: IMetabaseObjectDescriptor;
    pr: IMsProblem;
    Meta: IMsMetaModel;
    MetaVisual: IMsMetaModelVisualController;
    StartDate, EndDate: DateTime;
Begin
    mb := Params.Metabase;
    // Get modeling container
    MsObj := mb.ItemById["MS"];
    // Get modeling problem
    pr := mb.ItemByIdNamespace["FILLMODEL", MsObj.Key].Bind() As IMsProblem;
    // Get metamodel
    Meta := pr.MetaModel;
    MetaVisual := Meta.VisualController;
    StartDate := DateTime.Parse("01.01.1970");
    EndDate := DateTime.Parse("01.01.2020");
    MetaVisual.ExtendRubricatorPeriod(StartDate, EndDate);
End Sub;

See also:

IMsMetaModelVisualController