Remove(RubricatorKey: Integer): Boolean;
RubricatorKey. Key of time series database.
The Remove method removes settings for the specified time series database
If deletion is successful, the method returns True, otherwise it returns False. To delete all settings from the collection, use the IEaxWorkbookRubricatorOptionsList.Clear method.
Executing the example requires a form, the LanerBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for LanerBox. A workbook of the time series database should be loaded to UiErAnalyzer1.
Add links for the Express and Cubes system assemblies.
Sub UserProc;
Var
Ea: IEaxAnalyzer;
Wb: IEaxWorkbook;
WbTree: IEaxWorkbookMetaAttributesTree;
Laner: ILaner;
Rub: IRubricator;
RubKey: Integer;
OpList: IEaxWorkbookRubricatorOptionsList;
Res: Boolean;
Begin
// Get workbook
Ea := UiErAnalyzer1.ErAnalyzer;
Wb := Ea As IEaxWorkbook;
// Get object tree settings
WbTree := Wb.MetaAttributesTree;
Laner := Ea.Laner;
Rub := Laner.RubricatorInstance.Rubricator;
RubKey := (Rub As IMetabaseObjectDescriptor).Key;
// Get directory settings connected to the indicators tree
OpList := WbTree.RubricatorsOptions;
Res := OpList.Remove(RubKey);
If Res Then
Debug.WriteLine(Delete completed successfully);
Else
Debug.WriteLine(Specified time series database settings are absent);
End If;
(Ea As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the settings of time series database for the workbook loaded to LanerBox are deleted. Deletion result is shown in the console window.
See also: