Opened 8 years ago

Last modified 3 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)

current.png (4.5 KB ) - added by Michael Wetter 8 years ago.
expected.png (10.7 KB ) - added by Michael Wetter 8 years ago.

Download all attachments as: .zip

Change History (11)

by Michael Wetter, 8 years ago

Attachment: current.png added

by Michael Wetter, 8 years ago

Attachment: expected.png added

comment:1 by Adeel Asghar, 8 years ago

Cc: Martin Sjölund added
Component: OMEditInteractive Environment
Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

OMEdit can only render icon if omc returns the information.

>> getIconAnnotation(Buildings.Fluid.Movers.FlowControlled_m_flow)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Text(true, {0.0, 0.0}, 0, {0, 0, 0}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{22, 146}, {114, 102}}, "m_flow_in", 0, TextAlignment.Center), Line(true, {0.0, 0.0}, 0, {{32, 50}, {100, 50}}, {0, 0, 0}, LinePattern.Solid, 0.25, {Arrow.None, Arrow.None}, 3, Smooth.None), Text(true, {0.0, 0.0}, 0, {0, 0, 127}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{50, 68}, {100, 54}}, "m_flow", 0, TextAlignment.Center), Text(false, {0.0, 0.0}, 0, {0, 0, 255}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{-80, 136}, {78, 102}}, "%m_flow_nominal", 0, TextAlignment.Center)}}
[C:/OpenModelica/build/lib/omlibrary/Modelica 3.2.1/Blocks/Continuous.mo:1905:6-1905:53:writable] Error: Variable m_flow_nominal not found in scope Modelica.Blocks.Continuous.Filter$filter.
[C:/OpenModelica/build/lib/omlibrary/Modelica 3.2.1/Blocks/Continuous.mo:1919:6-1919:25:writable] Error: Variable m_flow_nominal not found in scope Modelica.Blocks.Continuous.Filter$filter.
[C:/OpenModelica/build/lib/omlibrary/Modelica 3.2.1/Blocks/Continuous.mo:1974:6-1974:38:writable] Error: Variable m_flow_nominal not found in scope Modelica.Blocks.Continuous.Filter$filter.
[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/PowerInterface.mo:59:3-71:44:writable] Error: Variable V_flow_max not found in scope Buildings.Fluid.Movers.BaseClasses.PowerInterface$heaDis.
[C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Movers/BaseClasses/FlowMachineInterface.mo:303:3-320:9:writable] Error: Variable eff.per.pressure.dp[2] not found in scope Buildings.Fluid.Movers.BaseClasses.FlowMachineInterface$eff.
[C:/OpenModelica/build/lib/omlibrary/Buildings 3.0.0/Fluid/Movers/BaseClasses/FlowMachineInterface.mo:303:3-320:9:writable] Error: Variable eff.per.pressure.V_flow[2] not found in scope Buildings.Fluid.Movers.BaseClasses.FlowMachineInterface$eff.
Version 0, edited 8 years ago by Adeel Asghar (next)

comment:2 by Martin Sjölund, 8 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 Martin Sjölund, 8 years ago

Milestone: Future1.12.0
Owner: changed from Adrian Pop to Martin Sjölund

comment:4 by Francesco Casella, 7 years ago

Milestone: 1.12.01.13.0

Milestone moved to 1.13.0 due to 1.12.0 already being released.

comment:5 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:6 by Francesco Casella, 5 years ago

Milestone: 1.14.01.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 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:8 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:9 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.