Import a Modelica Library or a Modelica Model without External Licensing
You can import Modelica libraries and models without any external licensing. This is by far the most common case. You can import Modelica files that are encrypted (.moe files) or not encrypted (.mo files) with their associated external resources (.html, .png, .mos, and others).
-
From the
Behavior Authoring section of the
action bar,
click
Import a Modelica File
.
Tip: You can also drag the Modelica file from, for example, the file browser to the work area. - In the Modelica File Import dialog box, browse to find the Modelica file.
-
In the pane, select the file.
Important: If you have opened a Modelica file with the same name as the Modelica file you want to import, you must unload that file before import, to avoid name conflicts. -
To validate file selection and import your Modelica file, click
Open.
Depending on if a Modelica file with the same name already exists in the database, there are two alternative results:
- If no Modelica file with the same name exists in the database, the Modelica file is imported in your session as a library reference. Its packages appear from the Package Browser. External files such as .htm, .png or .mos are also imported.
- If a Modelica file with the same name already exists in the database, the Library Version Management dialog box appears.
- If the Library Version Management dialog box does not appear, to save this new library with its behavior content, select Share > Save.
-
If the Library Version Management dialog box appears,
do the following:
- To let the imported Modelica file replace an existing Modelica file,
do the following:
- Select The imported library will replace the existing
library and click
Continue.
Important: This selection is only possible if you import a library with the same name and the same Modelica version as a library that exists in the database. Note: This is the default alternative, if possible. - In the Revision Selector dialog box that
appears, select the corresponding library revision from the
database and click OK.Notes:
- The dialog box displays all revisions of the selected library in the database.
- Currently only the revisions (A, B, C...) in the database are displayed, not the Modelica versions. To see both revisions and the corresponding Modelica versions, perform, from the top bar, a search for the library. As an example, to search for a library MyLib, enter dbl:*MyLib* and then click Search.
- For more information about the Revision Selector, see Collaborative Lifecycle User's Guide: Creating Revisions and Branches: Revision Explorer.
The Modelica file is imported in your session as a library reference. Its packages appear from the Package Browser. External files such as .htm, .png or .mos are also imported.
Note: If any of the libraries involved are encrypted, error messages may appear to indicate that you must perform additional actions. See Step 7. - To save this new library with its behavior content, select Share > Save.
The library revision in the database is overwritten by the imported library.
- Select The imported library will replace the existing
library and click
Continue.
- To use the imported library to create a new revision in the
database, do the following:Note: You can create that new revision from any existing revision in the database.
- Select Select an existing library to create a new version with the imported library and click Continue.
- In the Revision Selector dialog box that
appears, select the revision that the imported library is to be
a new revision of, and click OK.
Tip: Typically, when you want to create a new revision from a new build of a Modelica library, you select the latest revision. Notes:- The dialog box displays all revisions of the selected library in the database.
- Currently only the revisions (A, B, C...) in the database are displayed, not the Modelica versions. To see both revisions and the corresponding Modelica versions, perform, from the top bar, a search for the library. As an example, to search for a library MyLib, enter dbl:*MyLib* and then click Search.
- For more information about the Revision Selector, see Collaborative Lifecycle User's Guide: Creating Revisions and Branches: Revision Explorer.
The Modelica file is imported in your session as a library reference. Its packages appear from the Package Browser. External files such as .htm, .png or .mos are also imported.
Note: If any of the libraries involved are encrypted, error messages may appear to indicate that you must perform additional actions. See Step 7. - To save this new library with its behavior content as a new
revision, select Share > Save.
A new revision is created in the database. The revision is created from the selected library and contains the imported library.
- To let the imported Modelica file replace an existing Modelica file,
do the following:
-
When you work with encrypted files, you may get error messages that you
have to act on:
- If you try to replace an encrypted library version with another
encrypted library version, a warning appears. You have three choices:
- To replace the encrypted library with a new encrypted one, click
Yes.
The Modelica file is imported in your session as a library reference. Its packages appear from the Package Browser. External files such as .htm, .png or .mos are also imported.
- To go back to the previous dialog box without doing any import/replacement, click No.
- To cancel the import/replacement operation, click Cancel.
- To replace the encrypted library with a new encrypted one, click
Yes.
- If you try to replace an encrypted library version with an unencrypted version, an error message appears. To replace an encrypted library with an unencrypted library, you must first remove the encrypted library from the database. This is an administrator task.
- If you try to replace an encrypted library version with another
encrypted library version, a warning appears. You have three choices: