Create a Modelica Library
You can create a Modelica library by a command in the
action bar.
This way of creating a library uses a simplified dialog box. If you
want to also be able to specify also PLM names yourself, use the next subtask
to create the library.
-
From the
Behavior Authoring section of the
action bar,
click
New Modelica Library
.
The
Library Creation dialog box appears.
-
In the dialog box, do the following:
-
In the
Library Name box, enter the name of the
library, in this example enter
BatteryLib.
Notes:
- This
Library Name is the name that is
searched when using the
Search box of the
top bar.
- Only
characters allowed for Modelica names can be entered. See the Modelica Language
Specification for further details.
- You can only
enter a limited number of characters. When this limit is reached, you cannot
enter more characters.
- Optional:
In the
Library Version box, enter the version
of the library.
Note:
You can only enter a limited number of characters. When
this limit is reached, you cannot enter more characters.
- Optional:
In the
Description box, enter a description of
the library.
- Optional:
Activate the setting
Add an empty model if you want an empty
model
Unnamed to be created in the new
library.
By default, such a model is not created in the library.
However, in this scenario, activate this option.
-
Click
OK.
The new library is displayed from the
Package Browser. The
Component Browser displays the content
of the new library, in this case the empty model.
You can now work with the library, for
example, creating classes to instantiate components within. See create a new class. Notes:
- Compared to the full dialog in the next subtask, the PLM names for the library are
automatically created. See the result of the next subtask if you need to
know those names.
- You can change the name of a library by the command Class
Attributes. If you change the name, the PLM names for
the library are automatically changed.
- For more information about the command Class
Attributes, see Editing Class Attributes.
- For more information about changing PLM names, see the result of the next subtask.
Create a Dymola Behavior Library
You can create a Dymola Behavior Library by a content command.
This way of creating a library lets you specify PLM names yourself. If
you donĀ“t want to do that, use the previous subtask to create the library.
-
From the
top bar,
select
.
The
New content dialog box appears.
-
Expand
, then select
Dymola Behavior Library.
The
Dymola Behavior Library dialog box appears.
-
From the
Dymola Behavior Library tab:
-
In the
Title box, enter a title for the
representation that stores the Modelica content, in this example enter
BatteryLib_Representation.
- Optional:
In the
Description box, enter a description for
the behavior library representation.
Note:
You can only enter a limited number of characters. When
this limit is reached, you cannot enter more characters.
After creation, the PLM Representation Reference is seen as the parent
enclosing the Modelica library (the level above the Modelica library in the
tree).
-
From the
Modelica Attributes tab:
This tab corresponds to the subtask above, except for the
description box.
-
In the
Library Name box, enter a library name
for the Modelica library, in this example enter
BatteryLib.
Notes:
- This
Library Name is the name that is
searched when using the
Search box of the
top bar.
- Only
characters allowed for Modelica names can be entered. See the Modelica Language
Specification for further details.
- You can only
enter a limited number of characters. When this limit is reached, you cannot
enter more characters.
- Optional:
In the
Library Version box, enter the version
of the library.
Note:
You can only enter a limited number of characters. When
this limit is reached, you cannot enter more characters.
-
From the Dymola Behavior Library Reference tab:
-
In the Title box, enter a title for the
reference that contains the behavior library representation within
the database, in this example enter
BatteryLib_Reference.
- Optional:
In the Description box, enter a description
of the library reference.
Note:
You can only enter a limited number of characters. When this
limit is reached, you cannot enter more characters.
After creation, the PLM Reference is seen as the parent enclosing the PLM
Representation Reference (the second level above the Modelica library in the
tree).
-
Click
OK.
The following is the result:
- From the Dymola Behavior Modeling
app, the new behavior library is
displayed from the Package Browser and the
Component Browser.
- The new components in the tree looks like:
You can now work with the library, for
example, creating classes to instantiate components within. See create a new class.
|