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?
Is there an API to check:
1) If there is a case open (.sav file) 2) What case is open - return the filename?
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"