# Open PSS/E GUI and SAV file from Powershell/cmd?

It is possible to open the PSS/E GUI and a SAV file with one command?

For example, something like this (it doesn't work):

"C:\Program Files (x86)\PTI\PSSE33\PSSBIN\psse33.exe" "C:\Program Files (x86)\PTI\PSSE33\EXAMPLE\sample.sav

As another question; is it possible to take an instance of PSS/E that is running in Python, and open the GUI and maintain the state?

edit retag close merge delete

Sort by » oldest newest most voted

The answer to the first question is a definitive YES. But since I have not tried everything to make sure no regression, I will suggest you to use the solution with care (if you run info some DLL not found, that would mean this solution is not adding some paths to PSSE).

Ok, here we go.

Firstly, you can get the gist by just right click on the PSSE shortcut on your desktop. It should be something like this:

"C:\Program Files\PTI\PSSE33\PSSBIN\psse33.exe" -ini C:\Windows\psse3304.ini -pyver 27


What this means is that, the shortcut calls up psse33.exe, with the options of:

1. -ini, and the path of the ini file that configures PSSE
2. -pyver, the version of Python, which is 2.7 here

If you run this line of code in cmd, it will start PSSE with nothing loaded, just as double-clicking on the shortcut.

If you open the INI file, you will see the whole config. One noticeable is the "PATH", under "STARTUP". Therefore, we can deduce this code:

"C:\Program Files\PTI\PSSE33\PSSBIN\psse33.exe" -path "C:\Program Files\PTI\PSSE33\Example\savnw.sav"  -ini C:\Windows\psse3304.ini -pyver 27


What this code does is to call up psse33.exe with the options of "-path", "-ini" and "-pyver". This would start PSSE GUI with the example "savnw.sav" loaded. Tested on Windows 7 with PSSE v33.4. You can look into the INI file more and play with the command line swtiches.

For the second question, I think it is interesting, but I am not sure. I think you probably would not have the same instance, but might be able to sync the state to some extent (version dependent). What do you need the GUI for? If you can Python stuff, why would you need the GUI?

more

Thank you, that is very helpful. (Unfortunately, I don't have enough karma to upvote you!)

( 2020-02-13 07:42:59 -0500 )edit

I'm curious about pushing the state of a Python session to PSS/E because it is sometimes useful to view the transmission slider and network spreadsheet for a visual outlook of the system.

( 2020-02-13 10:06:06 -0500 )edit

Do you think it's possible to open a sav, snp, and sldr with a command and ini file? I'm playing around with it, will let you know if I find out.

( 2020-02-13 10:08:16 -0500 )edit

Okay I found a way. I couldn't seem to get multiple files (ex. a snp and sav) open thru the command line, but I found that I could open a python file right away. So: "C:\Program Files (x86)\PTI\PSSE33\PSSBIN\psse33.exe" -path "C:\Users\USERNAMEHERE\Desktop\Open_Cases.py" etc...

( 2020-02-13 10:54:00 -0500 )edit