CONTROLLING SPECTRUM VIEWER WITH DDE
When writing a measuring program, you can use Spectrum Viewer as your data display with DDE. First save the data file, open a DDE connection to Spectrum Viewer and tell it to open the file automatically. Working this way has two advantages:
Your file has to be saved in order for SV to open it, so the data is already safe on disk when you see it displayed
When opening a connection to SV, use the following parameters:
name: "SV Server"
Topic: "SV Client 1"
Commands supported by the server:
SelectOneDS (+ ds#)
DeSelectDS (+ ds#)
GetSelectedDS (+ ds#)
GetDSInfo (+ ds#)
FileOpenAndDelete // opens a file and deletes it after opening (for temporary files)
FileClose // closes all data sets that came from the file
FileCloseSelected // closes all data sets that are selected
FileCloseAll // closes all data sets (ctrl-Q)
FileDelete // closes all data sets from a file and deletes it
FileLoadSession // loads a new session and deletes the current one
FileLoadSessionStyles // loads a new session and deletes the current one
FileSaveSession // saves the current session to a file. If you want
FileSaveSessionAsk // saves the current session to a file with file selection popup
ViewZoomAutoscale // Auto scales (same as F5)
I have included a C example file you can use as a starting point to connect your own program with Spectrum Viewer.
To test DDE functionality, you can use the DDETest.exe program that is installed in the SpecView folder.
If you set "Show DDE communication info" in the help popups section of the SpecView.ini file to 1, Spectrum Viewer will open an extra window with the DDE communication, so you can test what SV receives over DDE.