ObtainGroupLayerLimits

Declaration: TSpecCollection.ObtainGroupLayerLimits (Group: integer; var FirstLayer, LastLayer: integer): boolean;
Retrieves the range of the spectrum assigned to the spectral group Group. The range of the layers spanned by the specified spectrum is returned in the variable parameters FirstLayer and LastLayer. The function returns TRUE if the specified group is valid, otherwise a FALSE value is returned. If the returned value is FALSE the variable parameters FirstLayer and LastLayer are undefined.

Hint 1: Please note that ObtainGroupLayerLimits detects only the first range of spectra of a group. If a particular group is fragmented the other parts of the group are not detected (however, fragmented groups cannot occur under regular cirmcumstances).

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