Opened 7 years ago

Last modified 3 years ago

#4236 assigned defect

Icon not rendered if visible annotation is used

Reported by: mwetter Owned by: sjoelund.se
Priority: high Milestone:
Component: Interactive Environment Version:
Keywords: Cc: sjoelund.se

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)

current.png (4.5 KB) - added by mwetter 7 years ago.
expected.png (10.7 KB) - added by mwetter 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by mwetter

Changed 7 years ago by mwetter

comment:1 Changed 7 years ago by adeas31

  • Cc sjoelund.se added
  • Component changed from OMEdit to Interactive Environment
  • Owner changed from adeas31 to adrpo
  • Status changed from new to assigned

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
Last edited 7 years ago by adeas31 (previous) (diff)

comment:2 Changed 7 years ago by sjoelund.se

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 Changed 7 years ago by sjoelund.se

  • Milestone changed from Future to 1.12.0
  • Owner changed from adrpo to sjoelund.se

comment:4 Changed 6 years ago by casella

  • Milestone changed from 1.12.0 to 1.13.0

Milestone moved to 1.13.0 due to 1.12.0 already being released.

comment:5 Changed 5 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:6 Changed 4 years ago by casella

  • Milestone changed from 1.14.0 to 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:7 Changed 3 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:8 Changed 3 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:9 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.