Ask Your Question
0

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

asked 2016-10-24 02:58:20 -0600

bcar11559 gravatar image

Is there an API to check:

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

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by bcar11559
close date 2016-10-24 05:39:53.007338

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-10-24 03:57:43 -0600

zezo510 gravatar image

updated 2016-10-24 04:22:56 -0600

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"
edit flag offensive delete link more

Comments

perfect thanks

bcar11559 gravatar imagebcar11559 ( 2016-10-24 05:39:36 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-24 02:58:20 -0600

Seen: 905 times

Last updated: Oct 24 '16