ObtainGroupLayerLimits

Declaration: TMetaData.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 group 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 circumstances).

Hint 2: In order to directly access the metadata of the currently loaded dataset you can use the pre-declared global variable MData.