Editing Modelica Text

You can edit the Modelica code of a class.

  1. Select a class or a package.

  2. Activate Modelica Text Editor from the Authoring toolbar.

    Tip: You can also access this command from the contextual menu of a parameter, in the Component Parameters Edition dialog box. Refer to Working With the Component Parameters Edition Dialog Box.

    The Modelica Text Editor dialog box appears.

    Important: When a package is selected, the Text Editor command:
    • displays its Modelica text
    • does not display the text of the classes contained in this package.

      These classes are represented with a blue icon, you can click this icon to open the Modelica text of this class.

  3. Select your display mode:

    • Text Editor : displays and lets you edit the Modelica text in an expandable/collapsed code format, along with html tags.

      Note: You can edit the Modelica text only with this mode.

    • Formatted Text Display : displays the full Modelica text with mathematical notation.
    • Show Used Classes : displays the used classes. While you are in this read-only mode, you cannot view the formatted text, and other options are disabled.

  4. In a Modelica Text Editor mode, edit the Modelica code.

  5. In a Formatted Text Display mode, navigate through extended classes using hyperlinks.

  6. In a Show Used Classes mode, right-click and select Settings to access a number of additional, temporary, options. Click Show Modelica Text to switch back to the text editor.

  7. Click Apply to add this information to the active class without closing the Modelica Text Editor dialog box.

  8. Select another class.

    Tip: You can also type the path of the class then click Search and Display .

    Its Modelica text appears in the Modelica Text Editor dialog box.

    Note that a red lock appears, to indicate that this class is not the active one, so it cannot be edited.

  9. Click the red lock symbol to activate the class.

    The symbol turns green, you can now edit the Modelica text of this class.

  10. Use the blue arrows to navigate through the previous and next Modelica texts that you have already opened.



  11. Click OK to close the Modelica Text Editor dialog box.