File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1154,12 +1154,13 @@ def plot(
11541154 ModelicaSystemError ("No resultfile available - either run simulate() before plotting "
11551155 "or provide a result file!" )
11561156
1157- if not plot_result_file .is_file ():
1157+ if plot_result_file is None :
1158+ ModelicaSystemError ("No resultfile defined!" )
1159+ elif not plot_result_file .is_file ():
11581160 ModelicaSystemError (f"Provided resultfile { repr (plot_result_file .as_posix ())} does not exists!" )
1159-
1160- expr = f'plot({ plotdata } , fileName="{ plot_result_file .as_posix ()} ")'
1161-
1162- self .sendExpression (expr = expr )
1161+ else :
1162+ expr = f'plot({ plotdata } , fileName="{ plot_result_file .as_posix ()} ")'
1163+ self .sendExpression (expr = expr )
11631164
11641165 def getSolutions (self , varList : Optional [str | list [str ]] = None , resultfile : Optional [str ] = None ) -> tuple [str ] | np .ndarray :
11651166 """Extract simulation results from a result data file.
You can’t perform that action at this time.
0 commit comments