RestoreLaner(Laner: ILaner; ParamValues: IMsModelParamValues);
Laner. Working area of the time series database.
ParamValues. Parameters, with which the metamodel is restored. If its parameters are not set, the Null value must be specified.
The RestoreLaner method restores working area of time series database from a metamodel.
Executing the example requires a form, a button with the Button1 identifier on this form, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is used as a data source for TabSheetBox. Working area of the time series database must be loaded to UiErAnalyzer1. Modeling container of this database must include metamodel with the OBJ_METAMODEL identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
ActiveMetabase: IMetabase;
Rub: IRubricator;
Cont: IMetabaseObjectDescriptor;
MModel: IMsMetaModel;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
Rub := Laner.RubricatorInstance.Rubricator;
Cont := Rub.ModelSpace;
ActiveMetabase := MetabaseClass.Active;
MModel := ActiveMetabase.FetchItemById("OBJ_METAMODEL", Cont.Key).Edit As IMsMetaModel;
MModel.RestoreLaner(Laner, Null);
End Sub Button1OnClick;
On clicking the Button1, series from the metamodel OBJ_METAMODEL are restored to working area of the time series database.
See also: