Using the Action Feature  

This task explains how to use an action. The scenario described below is broken down into 3 steps:
  • You first create a pad containing an action.
  • You store this action in a catalog
  • You then import the action stored in the catalog into another CATPart product.
The action editor was improved. For more information, see About the Rule Editor. Note that comments are not supported in the Action editor.
It is highly recommended to be familiar with the Part Design workbench to perform this scenario.
  1. Access the Part Design workbench and create a Pad or open the KwrAction.CATPart file.

  2. 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.
  3. 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. 
  1. 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.
  2. Open the KwrReceiveAction.CATPart file.

  3. 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.

  1. Select PartBody: the imported action displays the volume of the pads contained in this body.

  1. Select Body.2: the imported action displays the volume of the pads contained in this body.