Opened 11 years ago

Closed 11 years ago

#2697 closed discussion (invalid)

Is this invalid or should display?

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: normal Milestone: 1.9.1
Component: OMEdit Version: trunk
Keywords: Cc:

Description

I have a "connector" model created in another environment. Its code is as follows:

expandable connector busConnector
  annotation(Icon(graphics = {Rectangle(extent = {{-20, 12}, {20, 8}}, lineColor = {255, 204, 51}, lineThickness = 0.5), Polygon(points = {{-80, 60}, {80, 60}, {100, 40}, {80, -30}, {60, -40}, {-60, -40}, {-80, -30}, {-100, 40}, {-80, 60}}, lineColor = {0, 0, 0}, fillColor = {255, 204, 51}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-65, 35}, {-55, 25}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-5, 35}, {5, 25}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{55, 35}, {65, 25}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-35, -5}, {-25, -15}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{25, -5}, {35, -15}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Rectangle(extent = {{-14, 18}, {4, 10}}, lineColor = {255, 204, 51}, lineThickness = 0.5)}));
end busConnector;

Is shown correctly by OM in "icon view", but when it is dragged on a model it is displayed with a grey rectangle.
Is it correct Modelica and this is an issue, or it is not valid Modelica?

Change History (3)

comment:1 by Adeel Asghar, 11 years ago

Everything is correct. OM is showing it according to the specification. The specification says,

For connectors, the icon layer is used to represent a connector when it is shown in the icon layer of the enclosing model. The diagram layer of the connector is used to represent it when shown in the diagram layer of the enclosing model. Protected connectors are only shown in the diagram layer. Public connectors are shown in both the diagram layer and the icon layer. Non-connector components are only shown in the diagram layer.

The grey box is shown by OMEdit when there is no annotation associated with the component.

I have checked that Dymola uses the icon annotation for the diagram view when there is diagram annotation present in the class. But this is not what I interpret from the specification.

Last edited 11 years ago by Adeel Asghar (previous) (diff)

comment:2 by massimo ceraolo, 11 years ago

Ok.
I suspected something like this.
I added a Diagram annotation and, as you say, the icon is correctly shown in the diagram layer.

I'm going to close this ticket.

comment:3 by massimo ceraolo, 11 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.