You can create an action that lets you perform interactively what the Enterprise
Knowledge Language (EKL) enables you to do. For example, you can perform search and
query operations.
Notes:
Actions can be upgraded.
Like with other objects using computation algorithms, the upgrade command
switches all algorithms used in expressions to the last available version of
algorithms. When the relation is modified explicitly, it is automatically
upgraded.
When creating an action with no arguments, you can
choose not to display the action dialog box when executing it. To do so,
right-click the action in the tree and select No dialog box when
running an action without arguments.
From the
Compass, click
3D Modeling
Apps,
and select
Engineering Rules Capture.
To create an action, do the following:
Click
Action.
In the
Action Editor, enter the arguments in the
Argument list frame.
Enter the action script.
Click
OK.
Important:
Argument types must
be written in English.
The editor supports the autocompletion that
allows you to access available variables, Knowledge types, or
methods.
Tips:
You can use the following keyboard
shortcuts in the editor:
Ctrl+Z: Undo. Lets you delete the last word you
entered.
Ctrl+Y: Redo.
Ctrl+F: Search in text.
Ctrl+A: Select all.
You can reorder the arguments in the list using the up or down
arrows.
Example
In this example, you are going to create an action that computes the
volume of pads under a body.
Create two pads in a body.
From the
Compass, click
3D Modeling
Apps,
and select
Engineering Rules Capture.
Click
Action to create an action that searches for the pads contained in
the selected body and computes the volume of these pads. The Action editor
opens. Enter the following script and click
OK:
Inputs box
B: BodyFeature
Editor
let V(Volume)
B.Query("Pad","").Compute("+","Solid", "smartVolume(x)",V)
Message("Total volume of the pads under this body : #",V)
Right-click the action in the
tree
and select
Action.1 object > Run.
Notes:
The Process literal arguments as parameters option
lets you disregard literal arguments as inputs when running an action.
Instead of selecting a parameter in the tree, you can directly
enter a value for each literal argument without creating a parameter in
the first place.
The Process object arguments as
optional option lets you consider object input
arguments as optional while running an action. When this option is
on, all the object inputs are considered as Not
Valuated by default and the NULL parameter value
passes to the EKL Action script. You can optionally select objects
while running this action. By default, this option is specified as
off.