Publishing Parameters 

This scenario explains how to publish parameters. The scenario described below is divided into the following steps:
  • Add parameters to the Screw.2 document and publish its Diameter, Depth, and Volume parameters. Repeat the same operations with the second CATPart file.
  • Create a CATProduct file and import Screw.2.
  • In the context of the Bolt product, insert the Nut part that imports the Depth and the Diameter parameters by selecting the publication MyDepth and MyDiameter of Screw.2.
  • In the context of the bolt, replace Screw.2 (KwrScrew.CATPart) with Screw.2 (KwrScrew2.CATPart) that doesn't have the same structure as the first one but owns the same publications. Both the parameters and the check are recomputed.

A publication has a name and references a geometry or parameters inside the product (or one of its sub-products). 

The publication of parameters can be used when:  

  • Defining an import of parameters between two parts (similar to the import of geometry).
  • Defining relations at the assembly level between parameters (similar to constraints).
Before you start, make sure that the Keep link with selected object check box is selected (Tools>Options>Infrastructure>Part Infrastructure>General).
  1. Open the KwrScrew.CATPart document.

  1. Add parameters to the part.

    • Click the icon. The Formula Editor opens. From 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: MyVolume. Click Apply and click Add Formula. The Formula Editor opens.

    • Enter the following formula by using the Dictionary: smartVolume(PartBody\Pad.1 ) + smartVolume(PartBody\Pad.2 ) . Click OK, and Yes.

    • From the New parameter of type scrolling list, select Length and click New parameter of type.

    • In the Edit name or value of the current parameter field, enter the name of the parameter: MyDepth. Click Apply and click Add Formula

    • Enter the following formula: MyDepth=PartBody\Pad.2\FirstLimit\Length and click OK.

    • From the New parameter of type scrolling list, select Length and click New parameter of type.

    • In the Edit name or value of the current parameter field, enter the name of the parameter: MyDiameter. Click Apply and click Add Formula

    • Enter the following formula: MyDiameter=PartBody\Sketch.2\Radius.2\Radius * 2. Click OK twice.

  2. Publish the MyVolume, MyDepth, and MyDiameter parameters.

    To do so, select Tools>Publication and select the MyVolume, MyDepth, and MyDiameter parameters in the specifications tree. Click OK. The published parameters appear in the specifications tree below the Publication node. Close the file.

  3. Open the KwrScrew2.CATPart and repeat the steps listed above (steps 1 to 3 included). The part is identical to the one below. Close the file.

     
     
  1. Create a CATProduct file. Select Insert>Existing Component... and click the root of the specifications tree. The File selection box is displayed. Select the KwrScrew.CATPart file and click Open. The screw is imported.

  2. Select Insert>Existing Component..., select the Kwrnut.CATPart file and click Open. The nut part is inserted.

     
     
  1. Double-click the inner circle of the nut, the Hole Definition window is displayed.

    • Right-click the Diameter field and select Edit formula.... The Formula Editor opens.

    • Select MyDiameter in the screw publications. The formula is:
      PartBody\Hole.1\Diameter=`External Parameters\MyDiameter`. Click OK.

    • Right-click the Depth field and select Edit formula.... The Formula Editor opens.

    • Select MyDepth in the screw publications. The formula is:
      PartBody\Hole.1\HoleLimit.1\Depth=`External Parameters\MyDepth`. Click OK twice.

  2. Double-click, then right-click the Screw.2 component in the specifications tree and select Components>Replace Component.... The File Selection window opens. Select the KwrScrew2.CATPart file and click Open.

  3. Click Yes when prompted to replace all instances with the same reference as the selected product. Update the nut part: the parameters are recomputed.