I just tried out a feature in QSpice that I find useful.
It is the .system command.
It has been available since the 12/28/2024 build. I just got around to using it.
The .system command will be executed at the end of the entire simulation run. The text following the .system is expected to be CLI-type command line(s) to execute once the simulation is completed.
The .system command may be useful to move, delete (or add) intermediary files at the end. I found it useful to play a sound file. I consistently perform long (hours+) sim runs. Playing a sound file allows me to potentially hear that the sim is complete without being in front of my computer.
Try adding this:
.system “C:\Windows\Media\Alarm01.wav”
This sound file should play at the end of the sim.
Here are some more details on its’ implementation:
- Aborting the simulation will NOT execute the .system command.
- Multi-stepped sims will not execute the .system command at the end of the step. Only at the end of the last step.
- More than one .system command can be executed. (I’m not sure if I got this entirely correct but it seems to work. Thoughts?)
.system “C:\Windows\Media\Alarm01.wav”
.system “@echo %time%”
This example should first play the sound file then output the current time to the Qux output window.
Here’s where this gets a little tricky.
If you enter more than one .system commands as separate entries, QSpice will execute the commands in the order they were entered.
If you enter the .system commands on the same entry but placing a CTRL ENTER between commands to execute, QSpice will execute the commands in the order you wish.
Both methods above will look the same on the schematic but the first method may not execute in the order you wish.
Here’s a very simple example using the second multi-command method:
System Cmd test.qsch (1.0 KB)
Len