Command-line reference
  

This chapter lists all command-line actions and parameters you can use with SIGVIEW, as well as some general rules for using them.

1. General rules valid for all command-line actions:

·     You should always use SIGVIEW_EXE environment variable instead of actual SIGVIEW executable file name, for example: %SIGVIEW_EXE% -loadsws c:\myworkspace.sws. This will make it easier to reuse your scripts on another computer or if your SIGVIEW installation changes. This environment variable will be defined automatically during SIGVIEW installation.
·     For all references to a <windowname>, you have to use the window's name as visible in its title bar. Usually, you will use "Edit/Change window title" menu option to give a simple name to a window before saving a Workspace or a Tool file.
·     Any command parameter which includes spaces, for example "my window" or c:\Program files\myfile.wav" has to be enclosed in quotes (general rule for Windows command line calls)
·     All file paths are full paths including directory and file name, for example "c:\my dir\my file.txt"
·     You should use only one command in each call. To execute multiple commends, use multiple SIGVIEW calls (multiple lines in the batch file).



2. Full list of command-line actions and options:


%SIGVIEW_EXE% -loadsws <sws_file_name> [<signalfilename> ...]
Loads Workspace file in SIGVIEW. If workspace has been saved without absolute file names in it, you can define those as additional parameters (full file names) in order of their appearance in workspace file. See Loading and saving workspaces for more information.

%SIGVIEW_EXE% -hide
Hides SIGVIEW window

%SIGVIEW_EXE% -show
Shows SIGVIEW window again if it was hidden with the -hide command

%SIGVIEW_EXE% -closeall
Closes all opened windows

%SIGVIEW_EXE% -daqstart <windowname>
Starts data acquisition of a window with the specified name. Of course, window must be Data acquisition window. The effect will be the same as if choosing "Data acquisition/Start data acquisition" main-menu option. If you would like to start multichannel data acquisition, it is enough to call this command for the first channel.

%SIGVIEW_EXE% -daqstop <windowname>
Stops data acquisition of a window with the specified name. Of course, window must be Data acquisition window. The effect will be the same as if choosing "Data acquisition/Start data acquisition" main-menu option. If you would like to stop multichannel data acquisition, it is enough to call this command for the first channel.

%SIGVIEW_EXE% -daqreset <windowname>
Resets data acquisition in a window with the specified name. Of course, window must be Data acquisition window. Data acquisition must be stopped before resetting.

%SIGVIEW_EXE% -playnotone <windowname>
Plays signal in a specified window without tone output. The effect will be the same as if choosing "Play&Navigate/Play (no sound)" main-menu option.

%SIGVIEW_EXE% -playwithtone <windowname>
Plays signal in a specified window with tone output. The effect will be the same as if choosing "Play&Navigate/Play signal(with sound)" main-menu option.

%SIGVIEW_EXE% -playstop <windowname>
Stops signal playing in a specified window started with -playnotone or -playwithtone options. The effect will be the same as if choosing "Play&Navigate/Stop playing" main-menu option.

%SIGVIEW_EXE% -zoomout <windowname>
Zoom-out signal in a specified window so that the whole signal is visible. It should always be used before storing signal in a file if you would like to save the whole signal. Otherwise, only a visible signal part will be stored.

%SIGVIEW_EXE% -zoomin <windowname> <length_in_samples> [<offsett_in_signal_units>]
Zoom-in signal in a specified window to the specified length (in samples) starting from some offset (in signal units, for example seconds). If offset is omitted, signal beginning will be used. For example, %SIGVIEW_EXE% win1 256 0.6 will zoom-in signal in window "win1" to 256 samples starting from 0.6s.

%SIGVIEW_EXE% -savewav16 <windowname> <full_file_name>
Saves visible part of the signal in specified window to a 16-bit WAV file. If you would like to save the whole signal in a file, perform -zoomout command first (see above). For example, "%SIGVIEW_EXE% -savewav16 sig_win_1 c:\MyFiles\test.wav".

%SIGVIEW_EXE% -savewav32 <windowname>
Saves visible part of the signal in specified window to a 32-bit WAV file (32-bit float format). If you would like to save the whole signal in a file, perform -zoomout command first (see above). For example, "%SIGVIEW_EXE% -savewav32 sig_win_1 c:\MyFiles\test.wav".

%SIGVIEW_EXE% -saveascii <windowname>
Saves visible part of the signal in specified window to ASCII/CSV file format. ASCII file will contain two columns: one with X values and one with Y values from the signals. If you would like to save the whole signal in a file, perform -zoomout command first (see above). For example, "%SIGVIEW_EXE% -saveascii sig_win_1 c:\MyFiles\test.wav".

%SIGVIEW_EXE% -savebitmap <windowname> <bitmap_filename>
Saves graphical content of the <windowname> window as BITMAP file (*.bmp). This will work only if main SIGVIEW window is currently visible.

%SIGVIEW_EXE% -getvalue <windowname>
Gets current value from an instrument window with specified window name. Instrument value will be converted in text format, for example "4.325" and forwarded to the standard output. You can use standard batch file syntax to forward that value to a file or to another application. For example, "%SIGVIEW_EXE% -getvalue instr_max >> myinstrlog.txt" or "%SIGVIEW_EXE% -getvalue instr_max | myinstrprocessor.exe".

%SIGVIEW_EXE% -repeatforever on|off
Turns"Repeat forever" play option "on" or "off". This is a global setting valid for all windows.

%SIGVIEW_EXE% -playfast on|off
Turns "Play as fast as possible" play option "on" or "off". This is a global setting valid for all windows.

%SIGVIEW_EXE% -autovolume on|off
Turns "Adjust volume automatically" play option "on" or "off". This is a global setting valid for all windows.

%SIGVIEW_EXE% -closeapp
Closes SIGVIEW.

%SIGVIEW_EXE% -waitms <number_of_ms_to_wait>
Waits specified number of milliseconds and returns. It is useful as pause command if your programming language does not support it directly, for example when using batch files. Please note that time resolution of this command is very coarse - you should expect jitter of up to 100ms.
 
%SIGVIEW_EXE% -help
Shows list of supported commands in a message box.


For further information about using this commands, see Examples section.
  
Command reference