Opened 12 years ago
Closed 10 years ago
#1768 closed defect (fixed)
plotSilent breaks typesystem
Reported by: | Martin Sjölund | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.3 |
Component: | OMEdit | Version: | trunk |
Keywords: | whyohwhy | Cc: | Adrian Pop, Adeel Asghar |
Description
Using +plotSilent the output Boolean result of the plotAll command outputs:
{"_omc_PlotResult","/home/marsj/tmp/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum_res.mat","Plot by OpenModelica","true","true","plotAll","false","false","time","","0.0","0.0","0.0","0.0"}
Which is not a boolean. This should be resolved by creating a separate API call (plotAllSilent) instead of the config flag.
Change History (6)
comment:1 by , 12 years ago
Milestone: | → 1.9.0 |
---|
comment:2 by , 11 years ago
Milestone: | 1.9.0 → 1.9.1 |
---|
comment:3 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:4 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:5 by , 10 years ago
Alternative solution: When calling plot(), omc makes a call to a callback function that controls the behaviour of the plot command.
For example in OMNotebook:
Start by setting up the plot, maybe via:
omc_System_setPlotHandler(threadData, MyOMNotebookHandler);
The user evaluates a cell:
simulate(M); plot(...); val(x, 0.5);
The cell returns value:
record ... end SimResult; true 5.3
At the same time, the callback function was triggered. This function has all the relevant parameters for the plot Windows, sizes as int, etc.
OMNotebook can just choose what to do with this information (draw a diagram under the cell?). And "true" is simply returned from the plot command.
It would also work with 2 or more plot calls in the same cell.
Postponed until 1.9.1