|
-
Access the Part Design workbench and create a Pad or open
the KwrAction.CATPart file.
-
Create a parameter of volume type and assign it a
formula.
- Click the
icon, select Volume from the scrolling list, click
New Parameter of type and rename the Parameter (V in
this scenario).
- Click Add formula. The formula editor opens.
- Under Dictionary, select Part
Measures, and double-click smartVolume. Position
the cursor between the parentheses and select PartBody. Click
OK, Yes (when prompted for an automatic
update) and OK.
|
|
-
Access the Knowledge Advisor workbench and click the
Action icon ()
to create an action. The Action editor opens. Enter the following script
and click OK:
Inputs field |
B: Body |
Editor |
B.Query("Pad","").Compute("+","Solid","smartVolume(x)",V)
Message("Total volume of the pads under this body : #",V) |
|
- The action created above searches for the pads contained in the
selected body and computes the volume of these pads.
- For more information about Query and Compute, click
here.
- To see the created .CATPart file, click
here.
- Note that the arguments types must be written in English.
|
-
Save your file and store the created action in a catalog.
- From the Start menu, select Infrastructure >
Catalog Editor. The catalog editor opens.
- Click the Add Family icon (),
or select Insert > Add Family... from the main menu to
display the Component Family Definition dialog box. Indicate the
name of the family (ComponentFamily.2 in this scenario), and
click OK.
- Double-click the ComponentFamily.2 family in the catalog
structure and click the Add component icon (),
or select Insert > Add Component... to display the
Description Definition dialog box.
- Click Select external feature. Go back to the
geometry, select the Action.1 feature in the specification tree
and click OK. Save your catalog. The action contained
in your .CATPart file is now stored in the catalog you have
created.
|
-
Open the
KwrReceiveAction.CATPart file.
-
Click the Catalog icon ()
to import the action stored in the catalog. Click the Browse another
catalog icon
),
select your catalog, and click Open. Double-click
ComponentFamily.2, and double-click Action.1. The Insert object
dialog box opens.
-
Select PartBody: the imported action displays the volume
of the pads contained in this body.
-
Select Body.2: the imported action displays the volume of
the pads contained in this body.
|