IWxObject.Delete

Syntax

Delete;

Delete();

Description

The Delete method deletes an object.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing object.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
Begin
    
// Get repository
    mb := MetabaseClass.Active;
    wsp := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    Shape := wsp.Shapes.Item(
0);
    Shape.Delete;
    (wsp 
As IMetabaseObject).Save;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Andy;
 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
Begin
    
// Get repository
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    Shape := wsp.Shapes.Item[
0];
    Shape.Delete();
    (wsp 
As IMetabaseObject).Save();
End Sub;

After executing this example the object located in a workspace is deleted.

See also:

IWxObject