First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hey Juan, Hopefully the code below should get you somewhere
import sys
import os
# adjust this location for the relevant version of PSSE
PSSE33BINPATH = r"C:/Program Files (x86)/PTI/PSSEUniversity33/pssbin;C:/Program Files (x86)/PTI/PSSEUniversity33/psslib;"
os.environ['PATH'] = PSSE33BINPATH + ';' + os.environ['PATH']
sys.path.append('C:/Program Files (x86)/PTI/PSSEUniversity33/pssbin')
sys.path.append('C:/Program Files (x86)/PTI/PSSEUniversity33/psslib')
import dyntools
def main():
signals = [] # will print all signals, else you can indicate them like so signals = [1,2,4,5]
outfiles = ['result1.out', 'result2.out'] # create a set of out files(this assumes that
# the files are in the same directory of python script)
for file_name in outfiles: # loop through outfiles
excel_file = file_name.split(".out")[0] + "_excel" # This line was added to show that xlsfile can be used to change name or even directory
dyntools.CHNF(file_name).xlsout(channels=signals, show=False, outfile=file_name, xlsfile=excel_file)
if __name__ == '__main__':
main()