Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to ignore pssplot's error message

Hello everyone, I want to create .jpg file automatically using python, this is my code:

for i in range(0,10):
filename = "case" + str(i+1)
pssplot.openchandatafile(path+filename+""".out""")

pssplot.dragdropplotdata(filename,r"""2 - ANGL   11[GEN#1      22.000]1""")
pssplot.dragdropplotdata(filename,r"""3 - ANGL   21[GEN#2    16.500]1""")
pssplot.dragdropplotdata(filename,r"""4 - ANGL   31[GEN#3      16.500]1""")

pssplot.exportplot(path+filename+"""-A.jpg""",3)
pssplot.deleteselplot()
pssplot.insertplot()

When running this code, sometimes an error message(Axis Maximum Value must be >= Minimum) will come out and I need to skip the case manually. Is there any way to ignore this error message and the code still running well?