AmesimKnowledge

Working with the Modelica Editor

Creating a new Model or Class

files creating a new file

creating a new file Click the New button or use File

New. The New class window dialog box.

Figure 33: New class dialog box

  • Type: Select the type of class you want to create from the drop-down list:

    Package

    Model

    Block

    Connector

    Function

    Record

    Type

  • Name: Enter a name for the new class.

  • Description: Enter a description for the class.

  • Extends from Extends from: Click the button to select which class you want your new class to be extended from.

  • Insert in a package Insert in a package: Click the button to select the package into which you will insert the new class.

  • Structured class: If you do not check this option when creating a package, its content is stored in a single .mo file.

  • Partial: Check this option to create a partial class. A partial class component is identified with the symbol in the diagram view.Figure 34: Partial class in the Text Editor and the Diagram Editor

Results

Note

The Insert in a package field automatically contains the library node that was selected when you clicked the New button or used File > New. If you selected the appropriate node before clicking New, there is no need to modify this field. If you want to change the package into which the class will be inserted, you can modify the selection through the button.

A new Modelica model or class is created and you can begin typing your code directly.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Modelica_Editor/Creating_a_new_Model_or_Class · retrieved 2026-07-17