ICalcObject.Delete

Syntax

Delete;

Description

The Delete method deletes calculation algorithm object.

Example

Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier.

Add links to the Algo, Metabase system assemblies. Add links to the assemblies required for working with calculation algorithms.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo: ICalcObject;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("ALGORITHM");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, True);
    Debug.WriteLine("Name: " + Algo.Name);
    Debug.WriteLine("Identifier: " + Algo.Id);
    Debug.WriteLine("Key: " + Algo.Key.ToString);
    // Delete calculation algorithm
    Algo.Delete;
End Sub UserProc;

After executing the example the development environment console displays information about calculation algorithm. After this the algorithm will be deleted from the repository.

See also:

ICalcObject