Creating Formulas based on Publications  

This task explains how to create a formula based on publications in a CATProduct file.
Note that a formula based on publications exclusively works for CATProduct files.
  1. Open the Screw1.CATPart document.

  2. Add a Volume parameter to the part. 

    • Click the icon. The Formula Editor opens. In the New parameter of type scrolling list, select Volume and click New parameter of type
    • In the Edit name or value of the current parameter field, enter the name of the parameter: ScrewVolume1. Click Apply and click Add Formula. The Formula Editor opens.
    • Enter the following formula by using the Dictionary to access the smartVolume operator: ScrewVolume1=smartVolume(PartBody\Pad.1). Click OK three times.
  3. Create another Volume parameter called ScrewVolume2 based on Pad.2.

  4. Create another Volume parameter called Volume_Total. Click OK when done to exit the Formula editor.

  5. Access the Tools>Publication menu, and select the 3 parameters that are displayed below the Parameters node. Assign them new names (see graphic below):

  6. Click OK when done. The parameters, the formulas, and the publications are created (see graphic below).

  7. Save your file and close it.

  8. Open the Screw2.CATPart document. Repeat the above steps (2 to 7).

  9. Create a product (File>New menu). Click OK when done.

  10. Select Insert>Existing Component... to insert Screw1.CATPart into the product.

  11. In the File Selection window, select the Screw1.CATPart file that you have just saved. Click Open.

  12. Create a formula that will compute the volume of the screw.

    • Click the Root product and click the icon. The Formula Editor opens.
    • Enter the following formula into the editor by selecting the publications in the specification tree:
    • Click OK when done. The screw volume is displayed below the parameters node.
  13. Double-click screw.1 in the specification tree, right-click it, and select Components>Replace Component.

  14. In the File Selection window, select the screw2.CATPart file that you have just saved and click Open.

  15. Click OK in the Impacts On Replace window. The new screw is inserted into the product and its volume is computed.