ForecastEndDate: DateTime;
The ForecastEndDate property determines forecasting period end date.
Executing the example requires that the repository contains a modeling container with the MODEL_SPACE identifier. The model with the MODEL_1 identifier is created in the container.
Add links to the Metabase and Ms system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Model: IMsModel;
Period: IMsModelPeriod;
Begin
// Get the current repository
MB := MetabaseClass.Active;
// Get model
Model := MB.ItemByIdNamespace("MODEL_1", MB.ItemById("MODEL_SPACE").Key).Edit As IMsModel;
// Get model periods
Period := Model.Transform.Period;
// Set sample period conditions
Period.IdentificationStartDate := DateTime.ComposeDay(2000, 1, 1);
Period.IdentificationEndDate := DateTime.ComposeDay(2005, 12, 31);
// Set forecasting period conditions
Period.ForecastStartDate := DateTime.ComposeDay(2006, 1, 1);
Period.ForecastEndDate := DateTime.ComposeDay(2010, 12, 31);
// Set use of specified periods
Model.UseModelPeriod := True;
// Save changes
(Model As IMetabaseObject).Save;
End Sub UserProc;
After executing the example sample and forecasting periods are changed for the model. The time series use of specified periods on problem calculation is also set for model.
See also: