Command line interface
SweepMe! can be controlled via a Command Line Interface (CLI) by handing over command line arguments.
Example
Open a command line (cmd) and type in the following line (assuming your current working directory is the SweepMe! installation):
SweepMe!.exe --sequence "examples/Instrument/SMU.set" --folder "SMU-Example_{y}{m}{d}" --file "IV" -r -s -c
(SweepMe! 1.6.1.6 and above)
SweepMe! is started and loads the example sequence SMU.set. The folder for the measurement data is set to SMU-Example_ followed by the current date, and the file name prefix is set to IV. After start of SweepMe!, the measurement runs automatically (-r), the data is saved (-s), and SweepMe! closes afterwards (-c).
From version 1.6.1.6, the option --sequence loads sequence files (".seq") as well as legacy setting files (".set"). The option --setting no longer exists. The file must have the extension ".seq", ".set" or ".sma", and the path must be absolute or relative to the SweepMe! installation folder. A sequence file can also be given without any option, e.g. when a file is dragged onto SweepMe!.exe. See Sequences for more information about sequence files.
For SweepMe! 1.5.7.3 to 1.6.1.5, use --setting instead of --sequence:
SweepMe!.exe --setting "examples/Instrument/SMU.set" --folder "SMU-Example_{y}{m}{d}" --file "IV" -r -s -c
For SweepMe! 1.5.6 and older, use this example:
SweepMe!.exe -setting="test.set" -folder="test2" -file="test1" -r -s -c
Command line output
SweepMe! is a GUI application, and on Windows, GUI applications do not have a console window and therefore no possibility to write messages into the console (even if SweepMe! was started from the command line). SweepMe! writes messages into the Debug window and the debug.log file by default.
Starting with Version 1.5.7.3, SweepMe! utilises a technology to still enable output to the console, with following limitations:
- By default, GUI applications will be started in the background, returning the control to the console immediately. This will mess up the messages in the console. To prevent this, start SweepMe! in a blocking way. Using the command line (cmd), this can be achieved with following command:or using Powershell:
start "" /wait SweepMe!.exe
Start-Process -Wait SweepMe!.exe
- Output to the console will only work if SweepMe! is started from a console (cmd, Powershell) directly. Starting SweepMe! with command line arguments from an IDE might not give the desired results.
Batch processing
By using batch files, SweepMe! can be started multiple times to perform different measurements, which have previously been configured and saved as a sequence file. In that way, you can easily insert further commands between consecutive calls of SweepMe!, e.g. a time to stop or a call of another script evaluating some data.
Command line arguments
In SweepMe! 1.5.7.3 and newer, you can get a comprehensive list of supported command line arguments and examples by running following command in a command line window (cmd):
start "" /wait SweepMe!.exe -h
The following options are available in SweepMe! 1.6.1.7:
| Option | Explanation |
|---|---|
| Measurement control | |
file.seq |
Load the specified sequence. Used when a sequence file is dragged onto SweepMe!.exe. Do not combine with --sequence.
|
--sequence "file.seq" |
Load the specified sequence (".seq", ".set" or ".sma"). From version 1.6.1.6; in SweepMe! 1.5.7.3 to 1.6.1.5: --setting "file.set" or -setting "file.set".
|
--folder "folder", -folder "folder" |
Set the folder name for saving the measurement data. |
--file "file", -file "file" |
Set the file name prefix for saving the measurement data. |
-r, --run |
Run the measurement when SweepMe! has started. |
-s, --save |
Save the data after the measurement. |
-c, --close |
Close SweepMe! after the measurement. |
--dashboard-mode |
Start SweepMe! showing only the dashboard (from version 1.5.8.3). |
| License management (only one of these options at a time) | |
--request-activation -o "file" |
Create a license request file (".request") for this computer. Upload this file to the sweep-me.net license server to get a license for this computer. |
--load-license -i "file" |
Load a license file (".license") that was issued for this computer by the sweep-me.net license server. |
--list-licenses |
Show the licenses that are activated on this computer. |
| Utility | |
-i, --input |
Input for an operation, e.g. the license file for --load-license.
|
-o, --output |
Output of an operation, e.g. the request file for --request-activation.
|
--force |
Force the operation, e.g. overwrite an existing output file. |
-d, --debugmode |
Show all debug messages in the Debug window. |
--reset-dismissed-messages |
Show again all messages that were set to "do not show again". |
-h, --help |
Show the list of command line arguments and examples. |
The license management options start SweepMe! in command line mode: SweepMe! prints the result to the console and does not open its main window. Example to list the licenses (cmd):
start "" /wait SweepMe!.exe --list-licenses
SweepMe! 1.5.6 and older
For older versions, the following table summarizes the command line arguments. Please note, that even the long command line arguments use single hyphens (like -setting) instead of double hyphens (like --setting).
| Option | Explanation |
|---|---|
| -setting="file.set" | set setting file to specified file |
| -r | run on start |
| -c | close after measurement |
| -s | save data after run |
| -file="file" | set file name prefix |
| -folder="folder" | set folder name |
| -d | debug mode: show all error messages in ConsoleWindow |