Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

for small number of buses, this code creates a slider within PSSe, though it does not set the proper X,Y coordinates:

#slider3.py
'''
Load a case (bus numbering assumes savnw.sav is loaded)
Open a new (blank) diagram
run this code 
'''
def DrawBusesSLD(buslist):
    n_buses=len(buslist)
    buses=[]
    for i in range(n_buses):
        buses.append(buslist[i][0])

    for i in range(n_buses):
        psspy.growbus(buslist[i][0],buslist[i][1], buslist[i][2])

# main:
busdata=[
         [203, 0, 0],
         [204, 2, 0],         #not drawn due to being a dummy bus in a multisection line
         [205, 2, 2],      
         [206, 0, 2]
        ]

DrawBusesSLD(busdata)