ResetTopobase;
ResetTopobase();
The ResetTopobase method replaces the current map with the map specified in the default repository.
If map is not selected in the repository by default, on calling the method nothing is done.
To determine topobase for the report, use the IEaxDataAreaSlice.Topobase property.
Executing the example requires that repository contains an express report with the EXPRESS_TOPOBASE identifier. The report contains a map which is not used as set by default.
Add links to the Express, Metabase, Topobase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
DataArea: IEaxDataArea;
Slice: IEaxDataAreaSlice;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Analyzer := MB.ItemById("EXPRESS_TOPOBASE").Edit As IEaxAnalyzer;
// Get data area
DataArea := Analyzer.DataArea;
// Get data slice
Slice := DataArea.Slices.Item(0);
// Reset topobase
Slice.ResetTopobase;
// Save changes
(Analyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, the map is replaced by the map set in the repository by default.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Topobase;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
DataArea: IEaxDataArea;
Slice: IEaxDataAreaSlice;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Analyzer := MB.ItemById["EXPRESS_TOPOBASE"].Edit() As IEaxAnalyzer;
// Get data area
DataArea := Analyzer.DataArea;
// Get data slice
Slice := DataArea.Slices.Item[0];
// Reset topobase
Slice.ResetTopobase();
// Save changes
(Analyzer As IMetabaseObject).Save();
End Sub;
See also: