First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

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

asked Jan 24 '0

likethevegetable gravatar image

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?

1 answer

Sort by » oldest newest most voted
0

answered Jan 27 '0

drsgao gravatar image

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?

link

Comments

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

likethevegetable gravatar imagelikethevegetable (Feb 13 '0)

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.

likethevegetable gravatar imagelikethevegetable (Feb 13 '0)

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.

likethevegetable gravatar imagelikethevegetable (Feb 13 '0)

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...

likethevegetable gravatar imagelikethevegetable (Feb 13 '0)

I am trying to open save and sld in the GUI with the command. What python commands did you include in "Open_Cases.py"? I tried psspy.case(case_path) and psspy.opendiagfile(sld_path) but it is not working. I can open sav file or sld file but not both together.

xgreen gravatar imagexgreen (Sep 8 '2)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Jan 24 '0

Seen: 2,018 times

Last updated: Jan 27 '20