You can extend the model using a Comment element with «ModelicaExtension» stereotype. The Modelica Extension comment can be owned by the element it is attached to or have a different owner. The Modelica Extension content is exported to the Modelica file together with the model. The Modelica code is generated depending on the owner of the Modelica Extension comment.


There are several cases of the model extension with Modelica Extension comments and how the content of the comments is exported: