- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Editing Icons
Editing Icons
Re: Editing Icons
Hi
Icons are drawn from the information provided in the annotations inside each component. If you look for example in the standard Modelica library component for the electrical ground then you will find this information:
// This is the result from the OMC API call which is basically printing the annotation textstring belonging to the Ground component //
>> loadModel(Modelica.Electrical.Analog.Basic.Ground)
>> getIconAnnotation(Modelica.Electrical.Analog.Basic.Ground)
{-100.0,-100.0,100.0,100.0,{Line(true,{{-60.0,50.0},{60.0,50.0}},{0,0,255},LinePattern.Solid,0.25,{Arrow.None,Arrow.None},3.0,false),Line(true,{{-40.0,30.0},{40.0,30.0}},{0,0,255},LinePattern.Solid,0.25,{Arrow.None,Arrow.None},3.0,false),Line(true,{{-20.0,10.0},{20.0,10.0}},{0,0,255},LinePattern.Solid,0.25,{Arrow.None,Arrow.None},3.0,false),Line(true,{{0.0,90.0},{0.0,50.0}},{0,0,255},LinePattern.Solid,0.25,{Arrow.None,Arrow.None},3.0,false),Text(true,{0,0,0},{0,0,255},LinePattern.Solid,FillPattern.None,0.25,{{-144.0,-60.0},{138.0,0.0}},"%name",0.0,"")}}
Either read the Modelica specification or the book Peter Fritzson. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. 940 pages, Wiley-IEEE Press,
2004
for more inforamtion about annotations.
Best Regards
Mohsen
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Editing Icons