ModelicaStandardLibrary icon indicating copy to clipboard operation
ModelicaStandardLibrary copied to clipboard

Icon and Diagram color of Modelica.Icons.SignalBus, SignalSubBus

Open AHaumer opened this issue 2 years ago • 1 comments

Extending from the above mentioned icons, it would be nice to be able to use different colours for different busses. I tried different solutions but didn't find a real nice one. How is it possible to choose the colour of the icon and diagramm when extending from Modelica.Icons.{SignalBus, SignalSubBus}?

AHaumer avatar May 01 '22 11:05 AHaumer

Using annotation of extends such as IconMap(primitivesVisible=false) or DiagramMap(primitivesVisible=true) disables inherited graphical primitives at corresponding layer. Then you can define your own icon or - in case of connectors - diagram. Example:

extends B_ExtendsBase
  annotation (
    IconMap(extent={{-100,-100}, {100,100}},primitivesVisible=false),
    DiagramMap(extent={{50,-50}, {0,0}},primitivesVisible=true));

Even if this is possible, the question arises of which color shall be a line connecting two bus connectors of different colors. :-|

tobolar avatar May 03 '22 08:05 tobolar