We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35b1d93 commit 4b01e00Copy full SHA for 4b01e00
1 file changed
OMPython/ModelicaSystem.py
@@ -1163,12 +1163,13 @@ def plot(
1163
ModelicaSystemError("No resultfile available - either run simulate() before plotting "
1164
"or provide a result file!")
1165
1166
- if not plot_result_file.is_file():
+ if plot_result_file is None:
1167
+ ModelicaSystemError("No resultfile defined!")
1168
+ elif not plot_result_file.is_file():
1169
ModelicaSystemError(f"Provided resultfile {repr(plot_result_file.as_posix())} does not exists!")
-
- expr = f'plot({plotdata}, fileName="{plot_result_file.as_posix()}")'
1170
1171
- self.sendExpression(expr=expr)
+ else:
+ expr = f'plot({plotdata}, fileName="{plot_result_file.as_posix()}")'
1172
+ self.sendExpression(expr=expr)
1173
1174
def getSolutions(
1175
self,
0 commit comments