IPrxScene3DSeries.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index. Series index.

Description

The Remove method removes a series by the specified index. The method returns True if a series has been removed successfully, otherwise it returns False.

Fore Example

Executing the example requires a form with the Button1 button, the IntegerEdit component named IntegerEdit1 (for a Fore.NET example the numericUpDown component named numericUpDown1). There must be a regular report with the REGULAR_REPORT identifier, which sheet houses a 3D scene with several data series. Add links to the Metabase Report, Tab, Ui, Forms, Forms.Net (for Fore.NET example) assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Report: IPrxReport;
    S: IPrxScene3D;
    Series: IPrxScene3DSeries;
    MB: IMetabase;
    Tab: ITabSheet;
Begin
    MB := MetabaseClass.Active;
    Report := MB.ItemById(
"REGULAR_REPORT").Edit As IPrxReport;
    Tab := (Report.Sheets.Item(
0As IPRxTable).TabSheet;
    S := Tab.Objects.Item(
0).Extension As IPrxScene3D;
    Series := S.Series;
    
If Series.Remove(IntegerEdit1.Value) Then
        WinApplication.InformationBox(
"Object is removed");
    
Else
        WinApplication.InformationBox(
"No object to remove");
    
End If;
   (Report 
As IMetabaseObject).Save;
End Sub Button1OnClick;

Enter series index into the string and click the button. After executing the example the appropriate message is displayed.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Report: IPrxReport;
    S: IPrxScene3D;
    Series: IPrxScene3DSeries;
    MB: IMetabase;
    Tab: ITabSheet;
    WinApp: WinApplicationClassClass = 
New WinApplicationClassClass();
Begin
    MB := Self.Metabase;
    Report := MB.ItemById[
"REGULAR_REPORT"].Edit() As IPrxReport;
    Tab := (Report.Sheets.Item[
0As IPRxTable).TabSheet;
    S := Tab.Objects.Item[
0].Extension As IPrxScene3D;
    Series := S.Series;
    
If Series.Remove(Convert.ToInt32(numericUpDown1.Value)) Then
       WinApp.InformationBox(
"Object is removed"Null);
    
Else
       WinApp.InformationBox(
"No object to remove"Null);
    
End If;
    (Report 
As IMetabaseObject).Save();
 
End Sub;

See also:

IPrxScene3DSeries