DeleteItemByItemId

Declaration: TSpecCollection.DeleteItemByItemId (ItemId: integer): integer;
The method DeleteItemByItemId deletes the spectrum with the item identifier specified by the parameter ItemId. Please note that the item id is a unique integer number greater than 0 and must not be mixed up with the index of a spectrum.

The function returns the following error codes:

 0 ... everything is OK, the spectrum has been removed
-1 ... (not defined)
-2 ... there is no such spectrum

Hint: In order to access the spectral collection currently loaded in the Spectral Collection Editor you can use the pre-declared global variable SCData.