Ask Your Question
1

"aflowcount" command does not work on PSSE/33.1.1

asked 2013-04-19 06:15:41 -0600

anonymous user

Anonymous

updated 2013-04-20 05:02:35 -0600

JervisW gravatar image

Hi, I am trying to list out the number and detials of the branches in a subsystem. I am using python scripts and the command "aflowcount". But PSSE gives an error saying

"Traceback (most recent call last):
  File "H:\wtg_model.py", line 19, in <module>
    ierr,n_brnchs = aflowcount(1, 1, 6, 2)
NameError: name 'aflowcount' is not defined".

Please help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-04-19 07:06:51 -0600

jsexauer gravatar image

Try using

nbrnchs = psspy.aflowcount(1,1,6,2)

Even though the documentation uses function in the form of just funcName(params), when actually using the function in a script you need use the form psspy.funcName(params).

Caviet: This is assuming you imported the psspy module using

import psspy

Technically, you could directly use the function names if you did

from psspy import *

however, I would recommend against that. It is poor form.

edit flag offensive delete link more

Comments

Agreed, that from import * format is bad form. One reason is that it is very frustrating to find where a function originally came from.

JervisW gravatar imageJervisW ( 2013-04-20 05:04:02 -0600 )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-04-19 06:15:41 -0600

Seen: 220 times

Last updated: Apr 20 '13