SpectralRangeOfType

Declaration: TSpdcSet.SpectralRangeOfType (SpType: TLayerType; var RangeLow, RangeHigh: double): integer;
The function SpectralRangeOfType determines the wavelength range which is required for a correct functioning of all spectral descriptors of the type SpType. The variable parameters RangeLow and RangeHigh return the lower and upper limits. Setting the parameter SpType to ctUndefined forces the method to check all spectral descriptors regardless of the spectral type they are referring to.

The function returns the following error codes:

 0 ... everything is OK
-1 ... no descriptor of the descriptor set matched the specified type
-2 ... range cannot be detected (a virtual descriptor addresses undefined descriptors)

Hint: In order to directly access the currently loaded spectral descriptors (those which are displayed in the Spectral Descriptor Editor) you can use the pre-declared global variable SPDCData.