FindGroupByType

Declaration: TSpecCollection.FindGroupByType (Spectype: TLayerType; DerivOrder: integer; var FirstLayer, LastLayer: integer): integer;
Finds the range of layers which belong to a group of the spectral type SpecType with an order of derivatives specified by DerivOrder. The range of the group is returned in the variable parameters FirstLayer and LastLayer.

The function returns the following error codes:

≥0 a suitable group has been found, the returned value is the corresponding group number
-1 no such group is available

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