SaveProblem(SerieIndices: Array): IMetabaseObjectDescriptor;
SerieIndices are indexes of the series being saved presented as an array. If the parameter value is Null, all the series are to be saved.
The SaveProblem method saves working area data as a modeling problem.
Saving a data table in the form of a modeling problem is relevant only if the table contains calculated series. Otherwise the empty problem is saved. The problem is saved to the child object of the time series database: that is, the Transformations modeling container. During saving the following objects are created:
Modeling variable - the modeling variables are created on the base of calculated series, for which the initial series (factors) are the input (explanatory) variables.
Model - describes the transformation of the modeling variable.
Metamodel - describes the model calculation sequence.
Problem - forms the metamodel manipulation problem.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. Workbook of the time series database must be loaded to UiErAnalyzer1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErA: IEaxAnalyzer;
Laner: ILaner;
ar: Array[1] Of Integer;
ProblDesc: IMetabaseObjectDescriptor;
Begin
ErA := UiErAnalyzer1.ErAnalyzer;
Laner := ErA.Laner;
ar[0] := 0;
ProblDesc := Laner.SaveProblem(ar);
Debug.WriteLine(ProblDesc.Name);
End Sub Button1OnClick;
After executing the example the first data series is saved as the modeling problem. The problem name is displayed in console window.
See also: