Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Load Spectrogram Palette
You can load a new Spectrogram Palette at any time. Clicking the Load Pal button opens a dialog that shows all palette files in Daqarta's App_Data folder. These are standard Windows 256-color palette files with a .PAL (or .PLT) extension.
Note: If you installed Daqarta to a folder other than the default, palette files will have a .PLT extension instead of .PAL. Otherwise, the files and all operations are identical.
Included with Daqarta are GrayScale.PAL and Default.PAL. You may find GrayScale useful for printing to a black and white printer, for example. The Default palette allows you to restore the orignal colors afterward, or after you have made experimental changes to the current palette.
If you have made changes to a palette but haven't saved it, you will be prompted to do so before the new palette is loaded.
The LoadPAL macro has no effect if any File Open or Save As dialog is already active.
LoadPAL= without a name will open the File Open dialog showing all .PAL (or .PLT) files, but with no default name.
LoadPAL="MyFile" will open the File Open dialog with the default name set to MyFile. (Note that quotes are needed around all filenames in macros.) If you accept this by hitting Enter or the Open button in that dialog, Daqarta will assume you want to open a file named MyFile.PAL and will fail if that file is not found.
After either of the above commands that invokes a File Open dialog, you may use IF.Posn?f=0 to see if the user has hit Cancel to exit without choosing a file name. This allows your macro to exit gracefully or take other action.
A.LoadPAL="MyFile" will open MyFile.PAL directly, without any File Open dialog. Note that this will replace the existing palette without saving changes, if any.
Similarly, if the Macro Variable Var0 holds a value of 12, then LoadPAL="Test"+Var0 will set a default file name of Test12. If you expect to use a large series of files, you can use LoadPAL="Test"+Var0(3) (for example) to set the decimal format to 3 integer places to get Test012. This will allow proper sorting by file name.
You can also load a palette from a macro array (Buf0 to Buf7) using the Buf0#Ps=n command, where n is a palette block number 0-3. See Copy Spectrogram Palette To/From Buffer Block under Macro Array Copy/Swap Operations.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved