Importing .mo, and .moe, and .mol Files

You can import Modelica models and libraries as .mo, .moe, or .mol files.

You can import them as pure files, but you can also import them by importing folders or zip files containing such files.

Note: You can import files using a command, or drop them on the home page, but you can only import folders using drop, if you don´t zip them.

If a model or library with the same name as the imported item is already available in the database, you can apply revision handling.

This task shows you how to:

Import Modelica Files by a Command

You can import a Modelica file by the home page command Import Files .

  1. In the Systems Simulation Design home page, click Import Files .
  2. In the File Upload dialog box, do the following:
    1. Browse for any of:

      • A .mo file.
        Note: You cannot import a file with the name package.mo directly, you must import the corresponding folder. Drop the corresponding folder on the home page instead, or zip the folder before importing it.
      • A .moe file.
        Note: You cannot import a file with the name package.moe directly, you must import the corresponding folder. Drop the corresponding folder on the home page instead, or zip the folder before importing it.
      • A .mol file.
        Note: You cannot import a file with the name package.mol directly, you must import the corresponding folder. Drop the corresponding folder on the home page instead, or zip the folder before importing it.
      • A .zip file containing any of the above file types.

    2. Click Open.

    Notes:
    Important: The names of a .mo, a .moe, or a .mol file and the imported root class must be the same. As an example, to import a .mo file containing the root class MyModel, the name of the .mo file must be MyModel.mo.

    The result is any of the following:
    • The model or library is imported successfully to the database, and it also appears in the Recent Content panel. From that panel, you can create a study template. For more information, see Managing a Study Template.
      Notes:
      • Sometimes the file you import contains several Modelica files, and the Recent Content panel can only display a limited number of items. If you don´t find the model or library, from the home page, click My Content to find it when creating a study template.
      • The model or library is imported to the database as a Dynamic Behavior Reference Object.
    • The model or library was not imported.
    • A model or library with the same name is already present in the database. The Library Revision Option dialog box appears with alternatives to select from. For more information, see Handle Revisions.

Import Modelica Files by Dropping Them on the Home Page

You import a Modelica file by dropping it in the Systems Simulation Design home page.

In the Systems Simulation Design home page, drop any of the following:
  • An .mo, a .moe, or a .mol file of a Modelica model or a Modelica library.
    Note: You cannot drop a file with the name package.mo, package.moe, or package.mol directly. Drop the corresponding folder instead.
  • A folder containing an .mo, a .moe, or a .mol file.
    Note: If the top folder contains a package.mo, a package.moe, or a package.mol file, the corresponding resources are also imported, otherwise only the .mo, the .moe, or the .mol file is imported.
  • A .zip file containing any of the above.

Notes:
  • You can only import one Modelica model or one Modelica library at a time.
  • You cannot import libraries or models depending on external licensing. This is always the case for licensed .mol files, the license is handled by a server that is not accessible from Systems Simulation Design. You must use the Dymola Behavior Modeling app instead.
Important: The names of an .mo, a .moe, or a .mol file and the imported root class must be the same. As an example, to import a .mo file containing the root class MyModel, the name of the .mo file must be MyModel.mo.

The result is any of the following:
  • The model or library is imported successfully to the database, and it also appears in the Recent Content panel. From that panel, you can create a study template. For more information, see Managing a Study Template.
    Notes:
    • Sometimes the file you import contains several Modelica files, and the Recent Content panel can only display a limited number of items. If you don´t find the model or library, from the home page, click My Content to find it when creating a study template.
    • The model or library is imported to the database as a Dynamic Behavior Reference Object.
  • The model or library was not imported.
  • A model or library with the same name is already present in the database. The Library Revision Option dialog box appears with alternatives to select from. For more information, see Handle Revisions.

Handle Revisions

You can handle revisions when you already have a Modelica model or a Modelica library with the same name as the imported item in the database.

Before you begin: When you import a Modelica file, the Library Revision Option dialog appears.
  1. In the Library Revision Option dialog box, select any of the following:

    For both alternatives, the latest revision in the database is selected to be the revision to work with. To select another revision, click More revisions and select a revision. For more information about revision handling, see Revision Explorer User Interface.

    Note: This reference describes the full Revison Explorer. Here only a subset of the commands is available.

    • To create a new revision from an existing library or model, select Select a library and create a new revision with the imported file.
    • To replace an existing library or model in the database with the imported library or model, select Select a library and replace it with the imported file.
  2. Click OK to validate.