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

Ask Your Question
1

Single Line Diagram using Python routine

asked Mar 19 '13

Amir gravatar image

updated Mar 19 '13

JervisW gravatar image

Thank you JervisW... My problem didn'tsolve yet.I wrote the similar code as u suggest i.e; DrawBusSLD but when i run it on PSSE it didn't create the single line diagram.Then i tried to create a single bus by writing this code

import os
import sys
PSSE_PATH=r'C:/program files/pti/psseuniversity32/pssbin'
sys.path.append(PSSE_PATH)
os.environ['PATH']+=';'+PSSE_PATH
import psspy
growbus(101,0,-3.2)

Again no SLD created there. Please me where is the problem.. ?

2 answers

Sort by » oldest newest most voted
0

answered Mar 19 '13

JervisW gravatar image

Amir, you've done a fantastic job importing the psspy library. What you must do next is to initialise PSSE and open a saved case.

import os
import sys
PSSE_PATH=r'C:/program files/pti/psseuniversity32/pssbin'
sys.path.append(PSSE_PATH)
os.environ['PATH']+=';'+PSSE_PATH
import psspy

# initialise psse
psspy.psseinit(10000)
# load a saved case.
psspy.case(r'c:/program files/pti/psseuniversity32/example/savnw.sav')

# now you can grow a bus
psspy.growbus(101,0,-3.2)

But unless you save the slider diagram file, you'll never see the result of growbus, because Python will exit.

link
0

answered Apr 28 '13

The Bull gravatar image

Hi Whitely , in the code you suggested to Amir befor we grow bus we have to open new sld file using the instruction PSSPY.NEWDIAGFILE() but even then the grown sld is too messy to read ,the question how to draw neat and clean single line sld is still unanswered :(

link

Comments

Correct. I've started a project that will auto-draw buses that are displayed nicely. But it isn't ready yet.

JervisW gravatar imageJervisW (May 8 '13)

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

Stats

Asked: Mar 19 '13

Seen: 2,259 times

Last updated: Apr 28 '13