Opened 5 years ago

Last modified 3 years ago

#5610 reopened defect

Implement IconMap and DiagramMap annotations

Reported by: casella Owned by: adeas31
Priority: blocker Milestone: 1.19.0
Component: OMEdit Version: 1.18.0-dev
Keywords: Cc: Andrea.Bartolini

Description

The IconMap and DiagramMap annotations were introduced in Modelica 3.0 long time ago, but they are still not implemented in OpenModelica.

The attached package provides a simple test case. The icon of the model in Test2 should only show "M2", and the diagram should be rescaled compared to the diagram of M1.

Attachments (2)

TestPrimitiveVisible.mo (697 bytes) - added by casella 5 years ago.
TestPrimitiveVisible1.mo (901 bytes) - added by Andrea.Bartolini 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by casella

comment:1 Changed 5 years ago by casella

  • Cc Andrea.Bartolini added

comment:2 Changed 5 years ago by adeas31

  • Status changed from new to accepted
  • Type changed from defect to enhancement

The example is wrong. The IconMap and DiagramMap annotations are for the extends clause. So the model M2 should be,

model M2
    extends M1 annotation(IconMap(primitivesVisible = false));
  annotation(Icon(graphics = {Text(origin = {-1, -49}, extent = {{-101, 49}, {101, -49}}, textString = "M2")}, coordinateSystem(initialScale = 0.1)));
end M2;

instead of,

model M2
    extends M1;
  annotation(
      IconMap(primitivesVisible = false),
      Icon(graphics = {Text(origin = {-1, -49}, extent = {{-101, 49}, {101, -49}}, textString = "M2")}, coordinateSystem(initialScale = 0.1)));
end M2;

The icon of the model in Test2 should only show "M2", and the diagram should be rescaled compared to the diagram of M1.

The rescaling is only done when the extent attribute is defined.

comment:3 Changed 5 years ago by adeas31

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:4 Changed 4 years ago by Andrea.Bartolini

  • Milestone changed from 1.14.0 to 1.18.0
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Type changed from enhancement to defect
  • Version set to 1.18.0-dev

Please consider the attached package TestPromotoveVisible1.mo

The model M2 extends M1 with the following annotation:

model M2
    extends M1 annotation(
      IconMap(primitivesVisible = false));

In the library tree the Model M2 icon is shown accordingly to the primitivesVisible = false modifier (i.e. the icon of the model M1 is not shown), but when the model M2 is dropped into the diagram of another model (model Test in this case) the icon of model M1 is shown again.

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.18.0~dev-43-g9c61439
sysop: ubuntu 18.04

Changed 4 years ago by Andrea.Bartolini

comment:5 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

comment:6 Changed 3 years ago by casella

  • Milestone set to 1.19.0

1.18.0 blocker tickets moved to 1.19.0

Note: See TracTickets for help on using tickets.