Displaying and Editing Modelica Text

Modelica Editor lets you display and edit the Modelica text of a class.

  1. Select and activate the class to edit.
  2. Click Modelica Editor .
    The Modelica text of the class appears in a new tab in the Modelica Editor.
    Note: If a Modelica Editor is already open, the new tab appears in that editor, otherwise a new Modelica Editor appears, containing the new tab.
  3. To edit the Modelica text, click Edit Modelica .
  4. Edit the text.

    If the padlock after the class path is red and closed , the class is either not active or write-protected. Click the padlock. If it turns green and open , you can now edit the class.

    Tip: To decide what should be displayed, from the context menu, select Expand to access the following commands:
    • Hide all annotations
    • Show components and connections: to expand all components and connections
    • Show entire text: to expand also annotations.

    Changed unsaved text is indicated by a star in the tab header.
  5. Click Apply All to add this information to the active class without closing the Modelica Editor.

    Important: You do this for all unsaved tabs in the editor.

  6. To display another class in the active tab, use the blue arrows to navigate through the previous and next class.
  7. Click to activate the class.

    Note: A green open padlock indicates that the class is editable. However, the class can only be edited in the Edit Modelica mode.

  8. Click OK to save the changes and close the Modelica Editor.

    Important: You save the changes for all unsaved tabs in the editor.