You can create and modify different parts of the Modelica
text in a model. The full text of the class can be created or modified,
including the declaration and termination of the class.
A number of Knowledge types are available to modify the Modelica
text of different Modelica classes. Each type of class has its own Knowledge
type, for example,
ModelicaFunction for Modelica classes of type
function. The available types are:
Type
|
Comment
|
ModelicaAllTypes
|
General type, the other types, except
ModelicaComponent , inherits attributes from
this type.
|
ModelicaBlock
|
For blocks
|
ModelicaClass
|
For classes
|
ModelicaComponent
|
For components. The attributes for this type are different from the other
types, see below. |
ModelicaConnector
|
For connectors
|
ModelicaFunction
|
For functions
|
ModelicaModel
|
For models
|
ModelicaPackage
|
For packages
|
ModelicaRecord
|
For records
|
ModelicaType
|
For types
|
The Knowledge types, except
ModelicaComponent
, have the following attributes
that specify what part of the Modelica Text is edited:
Attribute
|
Use
|
ModelicaText
|
Create or edit the full Modelica text of
a class.
|
ModelicaFullDocumentation
|
Create or edit the documentation of a
class.
|
ModelicaClassName
|
Edit the class name.
|
ModelicaDescription
|
Edit the description of a class.
|
ModelicaFullPath
|
Display the full path of a class.
|
ModelicaComponentName
|
Display the component name of a class
(read-only).
|
ModelicaUseOfClass
|
Display the uses annotations (read-only).
|
For
ModelicaComponent
, the following attributes exist:
Attribute
|
Use
|
McaComponentEnclosingClass
|
Display the enclosing class of the
component (read-only).
|
McaComponentDescription
|
Edit the component description.
|
McaComponentName
|
Edit the component name.
|
McaComponentReferenceClass
|
Display the reference class of the
component (read-only).
|
For most users, the most usable Knowledge type and related attribute
is
ModelicaModel.ModelicaText for modifying the
full Modelica text of a Modelica model. For an example of how to use this type,
see
Modifying the Modelica Text of a Modelica Class Using EKL Scripting.