IEaxWorkbookRubricatorOptionsList.Remove

Fore Syntax

Remove(RubricatorKey: Integer): Boolean;

Fore.NET Syntax

Remove(RubricatorKey: integer): boolean;

Parameters

RubricatorKey. Key of time series database.

Description

The Remove method deletes settings for the specified time series database

Comments

If delete is successful, the method returns True, otherwise it returns False. Use the IEaxWorkbookRubricatorOptionsList.Clear method to delete all settings from the collection.

 Fore Example

Executing the example requires a form, the LanerBox component and the UiErAnalyzer component with the UiErAnalyzer1 identifier, that is a data source for LanerBox. Workbook of the time series database must be loaded to UiErAnalyzer1.

Add links for the Express and Cubes system assemblies.

Sub procRemove;
Var
    Ea: IEaxAnalyzer;
    Wb: IEaxWorkbook;
    WbTree: IEaxWorkbookMetaAttributesTree;
    Laner: ILaner;
    Rub: IRubricator;
    RubKey: Integer;
    OpList: IEaxWorkbookRubricatorOptionsList;
    Res: Boolean;
Begin
    // Receiving workbook
    Ea := UiErAnalyzer1.ErAnalyzer;
    Wb := Ea As IEaxWorkbook;
    // Receiving object tree settings
    WbTree := Wb.MetaAttributesTree;
    Laner := Ea.Laner;
    Rub := Laner.RubricatorInstance.Rubricator;
    RubKey := (Rub As IMetabaseObjectDescriptor).Key;
    // Receiving directory settings, connected to the object tree
    OpList := WbTree.RubricatorsOptions;
    Res := OpList.Remove(RubKey);
    If Res Then
        Debug.WriteLine(Delete completed successfully);
    Else
        Debug.WriteLine(Selected time series database is not configured);
    End If;
    (Ea As IMetabaseObject).Save;
End Sub procRemove;

The settings of time series database for the workbook, loaded to LanerBox, are deleted when example is executed. Delete result is shown in the console window.

 Fore.NET Example

Executing the example requires a form, a button on the form with the button1 identifier, the LanerBoxNet component and the UiErAnalyzerNet component with the UiErAnalyzerNet1 identifier, which is used as a data source for the LanerBoxNet component. Workbook of the time series database must be loaded to UiErAnalyzerNet1.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Laner;

Private Sub procRemove();
Var
    Ea: IEaxAnalyzer;
    Wb: IEaxWorkbook;
    WbTree: IEaxWorkbookMetaAttributesTree;
    Laner: ILaner;
    Rub: IRubricator;
    RubKey: Integer;
    OpList: IEaxWorkbookRubricatorOptionsList;
    Res: Boolean;
Begin
    // Receiving workbook
    Ea := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
    Wb := Ea As IEaxWorkbook;
    // Receiving object tree settings
    WbTree := Wb.MetaAttributesTree;
    Laner := Ea.Laner;
    Rub := Laner.RubricatorInstance.Rubricator;
    RubKey := (Rub As IMetabaseObjectDescriptor).Key As integer;
    // Receiving directory settings, connected to the object tree
    OpList := WbTree.RubricatorsOptions;
    Res := OpList.Remove(RubKey);
    If Res Then
        System.Diagnostics.Debug.WriteLine(Delete completed successfully);
    Else
        System.Diagnostics.Debug.WriteLine(Selected time series database is not configured);
    End If;
    (Ea As IMetabaseObject).Save();
End Sub procRemove;

The settings of time series database for the workbook, loaded to LanerBox, are deleted when example is executed. Delete result is shown in the console window.

See also:

IEaxWorkbookRubricatorOptionsList