OpenModelica / OpenModelica

OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage.
https://openmodelica.org
Other
780 stars 297 forks source link

Enhancement proposal: Allow sending to clipboard diagrams used in OMEdit Plotting perspective and/or dynamic select in the diagram in Modelling perspective #11810

Open ceraolo opened 5 months ago

ceraolo commented 5 months ago

Description

When using DynamicSelect of text, the outcome is available the diagram window in Plotting perspective, and it is not in Modelling. For instance, the new PowerGrids, available from https://github.com/PowerGrids/PowerGrids/tree/develop outputs the numerical results on Power Flow in the diagram window in plotting perspective (and not in modeling perspective).

Unfortunately, this diagram cannot be exported through clipboard, and therefore the graphical results of a PowerFlow study are difficult to export, e.g. in a word document.

The issue can be solved in one (or both) of the following options: 1) write the dynamic content on the diagram in Modelling perspective also 2) add the possibility to export to clipboard the diagram shown in the plotting perspective.

Thanks.

Steps to Reproduce

1) load PowerGrids-develop 3) Examples.ENTSOE.PowerFLow You will see the numerical results (red, fuchsia and blue labels) only on the diagram in plotting perspective, where exporting to clipboard is not available

Expected Behavior

one or both of the tfollowing:

Version and OS

OM 1.22.0-dev-beta6. I tried the same model with 1.22.0 but unfortunately the model there did not show the numerical results at all, so there is room for a possible other ticket.

casella commented 5 months ago

According to the MLS Section 18.6.6, DynamicSelect has two inputs, one for the editing state (which is constant) and one for the non-editing state (which is actually dynamic). It makes sense to keep the second in the plotting perspective. We could then add copy&paste capabilities.

@ceraolo, the question is, what would you like to actually copy: the bitmap or a vector description?

ceraolo commented 5 months ago

@ceraolo, the question is, what would you like to actually copy: the bitmap or a vector description?

This question makes me think that you imagine this ticket bringing a request of a brand-new feature. Indeed it requests something that should require a very, very low programming effort: it is just a matter of adding to the Plotting perpective what is already available to diagrams in Modeling perspective!

OM diagram exports already avalable in Modelling perspective are very good quality bitmaps. BTW, I like them much more than dymola's, which have lower general quality and often contain mistakes.

A later note. This feature is very important for those making studies with output through dynamic labels on diagrams: if you want to compare two runs you must copy the output of the first one on another program before rnning the second one: you cannot use multiple diagrams with dynamic labels on them. This is different from when you need line plots, since you can use different plots from different runs.

casella commented 5 months ago

@adeas31 please implement at your earliest convenience, seems easy given the explanation.