First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I have a brute force python script that:
Keep in mind, this was for PSS/e 33 and Python 2.7. You can use this as a guide for adapting it to your needs or even specifying specific channel #'s/names:
# out2csv.py
# ---- Start of imports -------------------------------------------------------
import sys
import glob
sys.path.append("C:\Program Files (x86)\dev\psse33r12\PSSBIN")
sys.path.append("C:\Program Files (x86)\dev\psse33r12\PSSPY27") # dyntools.pyc location
import dyntools
# ---- End of imports -------------------------------------------------------
# ---- Start of main() --------------------------------------------------------
if __name__ == "__main__":
# Process filename arguments (if supplied)
if(len(sys.argv) >= 2):
out_files = sys.argv[1:]
else:
out_files = glob.glob("*.out")
for ctr, out_file in enumerate(out_files):
obj = dyntools.CHNF(out_file,
outvrsn = 0)
obj.csvout(outfile = out_file)
# Progress display
pc = (ctr + 1.0) / len(out_files) * 100.0
print'\r[%i %%] |%-20s|' % (pc, '-' * int(pc * 20.0 / 100.0)),
# ---- End of main() --------------------------------------------------------
2 | No.2 Revision |
I have a brute force python script that:
Keep in mind, this was for PSS/e 33 and Python 2.7. You can use this as a guide for adapting it to your needs or even specifying specific channel #'s/names:
# out2csv.py
# ---- Start of imports -------------------------------------------------------
import sys
import glob
sys.path.append("C:\Program Files (x86)\dev\psse33r12\PSSBIN")
sys.path.append("C:\Program Files (x86)\dev\psse33r12\PSSPY27") # dyntools.pyc location
import dyntools
# ---- End of imports -------------------------------------------------------
# ---- Start of main() --------------------------------------------------------
if __name__ == "__main__":
# Process filename arguments (if supplied)
if(len(sys.argv) >= 2):
out_files = sys.argv[1:]
else:
out_files = glob.glob("*.out")
for ctr, out_file in enumerate(out_files):
obj = dyntools.CHNF(out_file,
outvrsn = 0)
obj.csvout(outfile = out_file)
# Progress display
pc = (ctr + 1.0) / len(out_files) * 100.0
print'\r[%i %%] |%-20s|' % (pc, '-' * int(pc * 20.0 / 100.0)),
# ---- End of main() --------------------------------------------------------