-
From the
Compass,
click
3D Modeling Apps
, and select
Engineering Rules Capture.
-
From the
action bar,
click
Action
.
For full information about actions, see
Engineering Rules Capture
Users Guide: Working with Actions: Creating an Action.
-
In the
Action Editor, do the following:
-
Click the text pane to enter it.
-
Press
Enter to go to a new line.
-
From the
tree,
double-click
MyModel.
`MyLib\MyModel`
is inserted in the
text pane.
-
Type
.ModelicaText="model MyModel Real x(start=7); equation
der(x)=-x; end MyModel;"
The full line is now:
`MyLib\MyModel`.ModelicaText="model MyModel Real x(start=7); equation der(x)=-x; end MyModel;"
-
Click
OK.
The result is:
- The action is created.
- In the
tree,
under the
Relations.1 node, the action is displayed
with an icon
.
-
In the
tree,
under the
Relations.1 node, right-click
Action 1 and select
.
-
In the
Insert Object dialog box, click
OK.
The action is executed to create the Modelica text in
MyModel.
-
From the
Compass,
click
3D Modeling Apps
, and select
Behavior Modeling.
-
To check the result:
-
Open
MyModel.
-
From the
Behavior Authoring section of the
action bar,
click
Modelica Editor
.
The created Modelica text appears.
Note:
You can now edit and run the action directly without
changing app. You can edit the action by double-clicking the action in the
tree.