0

How to see what case is open / if there is a case open using psspy? [closed]

Is there an API to check:

1) If there is a case open (.sav file) 2) What case is open - return the filename?

bcar11559's avatar
1
bcar11559
asked 2016-10-24 02:58:20 -0500
edit flag offensive 0 remove flag reopen merge delete

Closed for the following reason "the question is answered, right answer was accepted" by bcar11559 2016-10-24 05:39:53 -0500

Comments

add a comment see more comments

1 Answer

1

You can use sfiles() to return the current Saved case and Snapshot filenames.

SavedCase, SnapFile = psspy.sfiles()
print SavedCase

and you can use it to check if a case file is open as follows:

if not psspy.sfiles()[0]:
    print "No Saved Case file is open"
else:
    print psspy.sfiles()[0] + " Saved Case file is open"
zezo510's avatar
21
zezo510
answered 2016-10-24 03:57:43 -0500, updated 2016-10-24 04:22:56 -0500
edit flag offensive 0 remove flag delete link

Comments

perfect thanks

bcar11559's avatar bcar11559 (2016-10-24 05:39:36 -0500) edit
add a comment see more comments