Ask Your Question

Revision history [back]

If the intent is to just print out the available bus numbers in a text report, then you can use built in psspy.busn.

Use this API to tabulate unused bus numbers within a specified bus number range (activity BUSN).
Batch command syntax:

BAT_BUSN BUSLO BUSHI

Python syntax:
ierr = busn(buslo, bushi)

Fortran syntax:
CALL BUSNAPI(BUSLO, BUSHI, IERR)

where:
Integer BUSLO Is the low limit of bus number range (input; 1 by default).
Integer BUSHI Is the high limit of bus number range (input; 999,997 by default).
Integer IERR Is the error code (output).
IERR = 0 no error occurred.
IERR = 1 invalid starting bus number.
IERR = 2 starting bus number is greater than ending bus number.
IERR = 3 prerequisite requirements for API are not met.