- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Overwrite an icon
Page Start Prev 1 Next End
Overwrite an icon
Overwrite an icon
Aug-28-14 16:01:59
Hello,
How can I change/overwrite an icon when extending a model with an existing icon.
For example the icon of model A is "A". Model B extends model A and should have the icon "B". The code below will logically put one on top of the other.
Is there a way to inhibit the inheritance of the icon, or to overwrite it? (instead of adding a white rectangle to "cover" the old icon)
Code:
model A
parameter Real a = 1;
parameter Real b = 2;
Real c;
equation
c = a + b;
annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics = {Text(extent = {{-50,-40},{50,40}}, textString = "A")}));
end A;
model B
extends A(a = d);
parameter Real d = 3;
annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics = {Text(extent = {{-50,-40},{50,40}}, textString = "B")}));
end B;
Thanks!
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Overwrite an icon
There are 0 guests and 0 other users also viewing this topic