Opened 9 years ago
Last modified 4 years ago
#4236 assigned defect
Icon not rendered if visible annotation is used
| Reported by: | Michael Wetter | Owned by: | Martin Sjölund |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Interactive Environment | Version: | |
| Keywords: | Cc: | Martin Sjölund |
Description
We use various models that use the visible attribute in the graphical annotation of the form such as:
visible = inputType == Buildings.Fluid.Types.InputType.Continuous,
It appears that OMEdit stops rendering all graphical elements of an icon once it encounters such a statement. The attached file current.png shows how Buildings.Fluid.Movers.FlowControlled_m_flow is currently rendered, while expected.png shows how it is rendered if I delete all visible = ... statements.
If this statement causes problems, could you at least set visible = true and render all other graphical annotations? This would at a minimum make the icons recognizable.
Attachments (2)
Change History (11)
by , 9 years ago
| Attachment: | current.png added |
|---|
by , 9 years ago
| Attachment: | expected.png added |
|---|
comment:1 by , 9 years ago
| Cc: | added |
|---|---|
| Component: | OMEdit → Interactive Environment |
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 9 years ago
It should work better now (there were some crashes in other libraries, but hopefully that is fixed as well).
There are still cases when we get bad icons, but they should be fewer now.
comment:3 by , 9 years ago
| Milestone: | Future → 1.12.0 |
|---|---|
| Owner: | changed from to |
comment:4 by , 8 years ago
| Milestone: | 1.12.0 → 1.13.0 |
|---|
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:6 by , 6 years ago
| Milestone: | 1.14.0 → 1.16.0 |
|---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:8 by , 5 years ago
| Milestone: | 1.17.0 → 1.18.0 |
|---|
Retargeted to 1.18.0 because of 1.17.0 timed release.

OMEdit can only render icon if omc returns the information.
>> getIconAnnotation(Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine) {annotation( Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Line(points = {{0, 50}, {100, 50}}, color = {0, 0, 0}, smooth = Smooth.None), Line(points = {{0, 80}, {100, 80}}, color = {0, 0, 0}, smooth = Smooth.None), Line(visible = not filteredSpeed, points = {{0, 100}, {0, 40}}), Rectangle(extent = {{-100, 16}, {100, -14}}, lineColor = {0, 0, 0}, fillColor = {0, 127, 255}, fillPattern = FillPattern.HorizontalCylinder), Ellipse(extent = {{-58, 50}, {54, -58}}, lineColor = {0, 0, 0}, fillPattern = FillPattern.Sphere, fillColor = {0, 100, 199}), Polygon(points = {{0, 50}, {0, -56}, {54, 2}, {0, 50}}, lineColor = {0, 0, 0}, pattern = LinePattern.None, fillPattern = FillPattern.HorizontalCylinder, fillColor = {255, 255, 255}), Ellipse(extent = {{4, 14}, {34, -16}}, lineColor = {0, 0, 0}, fillPattern = FillPattern.Sphere, visible = energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState, fillColor = {0, 100, 199}), Rectangle(visible = filteredSpeed, extent = {{-34, 40}, {32, 100}}, lineColor = {0, 0, 0}, fillColor = {135, 135, 135}, fillPattern = FillPattern.Solid), Ellipse(visible = filteredSpeed, extent = {{-34, 100}, {32, 40}}, lineColor = {0, 0, 0}, fillColor = {135, 135, 135}, fillPattern = FillPattern.Solid), Text(visible = filteredSpeed, extent = {{-22, 92}, {20, 46}}, lineColor = {0, 0, 0}, fillColor = {135, 135, 135}, fillPattern = FillPattern.Solid, textString = "M", textStyle = {TextStyle.Bold}), Text(extent = {{64, 98}, {114, 84}}, lineColor = {0, 0, 127}, textString = "P")})) } [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/MixingVolumes/BaseClasses/PartialMixingVolume.mo:92:3-93:72:writable] Error: Variable vol.T_start not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Delays/DelayFirstOrder.mo:11:4-12:30:writable] Error: Variable vol.state_default not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Delays/DelayFirstOrder.mo:4:60-4:71:writable] Error: Variable vol.m_flow_nominal not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Delays/DelayFirstOrder.mo:4:60-4:71:writable] Error: Variable vol.rho_default not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/MixingVolumes/BaseClasses/PartialMixingVolume.mo:83:11-83:26:writable] Error: Variable vol.V_nominal not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/MixingVolumes/BaseClasses/PartialMixingVolume.mo:85:7-85:24:writable] Error: Variable vol.V_nominal not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/MixingVolumes/BaseClasses/PartialMixingVolume.mo:85:7-85:24:writable] Error: Variable vol.state_start not found in scope Buildings.Fluid.Delays.DelayFirstOrder$vol. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:125:3-129:69:writable] Error: Variable vol.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:148:3-150:40:writable] Error: Variable vol.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:38:46-38:58:writable] Error: Variable vol.dynBal.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:84:7-84:19:writable] Error: Variable vol.dynBal.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:85:7-85:20:writable] Error: Variable vol.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:88:7-88:22:writable] Error: Variable vol.dynBal.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:115:3-117:55:writable] Error: Variable vol.dynBal.state_default not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:115:3-117:55:writable] Error: Variable vol.V not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:90:29-95:40:writable] Error: Variable vol.V not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:90:29-95:40:writable] Error: Variable vol.dynBal.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:90:29-95:40:writable] Error: Variable vol.T_start not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Interfaces/ConservationEquation.mo:232:7-235:31:writable] Error: Variable vol.V not found in scope Buildings.Fluid.Interfaces.ConservationEquation$vol$dynBal. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Movers/BaseClasses/IdealSource.mo:9:3-17:27:writable] Error: Variable preVar not found in scope Buildings.Fluid.Movers.BaseClasses.IdealSource$preSou. [C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Movers/BaseClasses/PartialFlowMachine.mo:2:1-503:23:writable] Error: Illegal to instantiate partial class PartialFlowMachine. Error: Error occurred while flattening model Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine