Importing Modelica Libraries
If you used a third-party tool to create model libraries in the Modelica 3.2.3 programming language, you can import the .mo files of those model libraries into MapleSim as a custom library. You can then use the imported components in your MapleSim models.
Your library can be either a structured entity (a library that is split into files and folders inside a folder) or a nonstructured entity (a single .mo file that contains the full library).
The folders and files in your library must adhere to the Modelica specifications. In particular, the following must be true:
Each folder in a structured entity must contain a package.mo file and the name of the top-level class in the package.mo file must match the name of the folder.
For .mo files not named package.mo, there can only be one top-level class in the .mo file and the name of the top-level class must match the name of the file. This holds for both structured entities and nonstructured entities.
When importing a library from a structured entity, any sub-entities contained within the structured entity are considered part of the library and are also loaded. Similarly, if you try to import a sub-entity of the library, the entire library is imported and not just the sub-entity.
When importing a library from a nonstructured entity, the .mo file cannot be stored in either a directory that contains a package.mo file or a subdirectory of a structured entity. In both cases, the .mo file is considered a sub-entity of a larger library and the larger library is loaded along with the .mo file.
To import a Modelica library:
From the File menu, select Import Modelica... to open the Select Modelica file to import dialog box.
Browse to the location of the Modelica library, select the Modelica file that represents the root of your Modelica library, and then click Open.
The Creating Library dialog box appears. It displays the progress of the library import.
After the import is complete, click Close.
Under the Library Components tab (
) you will find a new palette with the same name as the top-level class for your library. The components in the palette can be used in your MapleSim models. The custom palette will automatically appear in future MapleSim sessions.
You can replace an imported Modelica library with an updated version by reimporting the library.
It is possible to import Modelica models and model libraries that are based on the Modelica 3.1 programming language. However, for optimal results, it is recommended that you import .mo files that are written in the Modelica 3.2.3 programming language only.
Creating a Custom Library
Exporting a Model to a Modelica File
Hiding or Deleting a Custom Library
Model Workspace Toolbar
Opening Modelica Models
Download Help Document
What kind of issue would you like to report? (Optional)