Since it seems there is no command line spice packaged with the free pspice/orcad 9.1 student edition I decided I needed to figure out how to make it work, and I did. After much googleing, and failed command prompt switches, I figured out that the only (useful) switch that pspice would respond to on the command line is -c. Which basically allows the user to run a script against the UI after pspice AD is executed. The program loads visually, does it’s thing and then closes. That’s as good as I could get with the free stuff. If you blink while that is happening it’s a very clean solution. I wanted to do this because editing values in a netlist and re-running a simulation is much faster than than clicking in the schematic and updating values that way. Well, narrative aside here is the command:

pspice -C .cmd

And here is the contents of my command file…

File Open_Simulation
*path and file name of .sim file
C:\Users\jonny\Desktop\2130\hwd5a\hwd5-SCHEMATIC1-dasd.sim
OK
Simulate Run
* Exit Probe environment
File Exit


You can generate a script by opening the pspice AD and clicking File-> Log Commands (do some clicking…then) File-> Log Commands (to stop logging) or exit and it will add the act of exiting to the log. Of couse if you want the program to exit you can just add File Exit to the end of the command log.

Comments are closed.