In Modelica, it is possible to define annotations attached to an object, such as a connector, that change their graphical appearance.
Is it possible to also define how the connection from one connector to the other will look like? Such as two instances of the connector class "foo" will always have a dashed line as a connection, while two of the class "bar" will have a thicker full line.
So far, I noticed that the connections lines take the color of the outside stroke color of the connector, but that's it. And I did not find anything in the documentation related to this.
Yes, it is possible:
If you take a look at Modelica.Blocks.Examples.BusUsage_Utilities.ControlBus
you will se that extends from an icon (Modelica.Icons.SignalBus
) and places a small yellow rectangle on top of the icon:
If you modify the rectangle specification in the annotation of the connector the visible lines between the connectors will be displayed with the rectangle style, e.g.
The connected ControlBusses look like this:
On the information layer of Modelica.Blocks.Examples.BusUsage
there are a few remarks on the subject.
Best regards, Rene Just Nielsen