Ask Your Question
1

Single Line Diagram using Python routine

asked 2013-03-19 10:28:54 -0500

Amir gravatar image

updated 2013-03-19 17:47:11 -0500

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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-03-19 17:50:48 -0500

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.

edit flag offensive delete link more
0

answered 2013-04-28 00:10:32 -0500

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 :(

edit flag offensive delete link more

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 ( 2013-05-08 04:46:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2013-03-19 10:28:54 -0500

Seen: 2,236 times

Last updated: Apr 28 '13