Controlling Relations Update  

This topic provides you with 2 short examples showing you how to work with relations in Synchronous and in Update relation at global update command modes.
  • In the first example, you update a formula.
  • In the second example, you update an equation.
  • For a given relation, it is possible to determine that it only executes in Synchronous mode using the Edit->Properties command. Its evaluation can then be launched manually. The Synchronous mode enables you to create synchronous relations, that is to say relations that will be immediately updated if one of their parameters is modified. Relations based on parameters are the only ones that can be synchronous.
     
  • For a given relation, it is also possible to decide that its evaluation will be launched when the part is updated (Update relation at global update command). The relations can be asynchronous for 2 reasons:
    • You want the relation to be asynchronous
    • The relation contains geometry.
It is possible to change the update mode of a relation after it is created.
  • Right-click the relation in the specification tree and select Properties.
  • Select Synchronous or Update relation at global update check box.
For more information about the Synchronous or the Update relation at global update command options, see Infrastructure User's Guide: Customizing: Customizing Settings: Knowledgeware.

Updating a Formula

In this example, the document contains 2 parameters of Length type:

  • Length.1 is valuated by you.
 
  • Length.2 is valuated by a formula computing the distance between 2 points + Length.1.
  1. Open the KwrUpdatingaFormula.CATPart file.

  1. Expand the Relations node (if need be), right-click Formula.1 and select Properties.

  2. In the Properties window, unselect Update relation at global update check box. Click OK to validate.

  3. Double-click Length.1. The Edit parameter window is displayed. Enter 50 in the value field. Click OK to validate. The value of Length.2 is updated automatically and an update icon is displayed next to the formula indicating that it will also be updated at the global update.

  4. Right-click Formula.1 and select Properties.

  5. In the Properties window, unselect the Synchronous check box and select Update relation at global update check box. Click OK to validate.

  6. Double-click Point.2 in the specification tree or in the geometry.

  7. Enter the following values in the Point Definition window and click OK when done:

The Formula is not updated and an update icon is displayed next to the formula.

  1. Right-click Formula.1 and select Local Update. The formula and Length.2 are updated.

Updating an Equation

In this example, you change 3 parameters, a, b and c before solving the equation. If you use the Synchronous mode, an error is displayed when modifying the parameters values because the update is launched at each modification. To ensure the stability of the equation, the update must be launched after the 3 parameters are changed. Thus you need to select Update relation at global update.

  1. Open the KwrUpdatinganEquation.CATPart file. The following image is displayed:

    This document contains 4 parameters. x is a parameter valuated by an equation based on the other 3 parameters (a, b, and c).
  2. Expand the Relations node (if need be), right-click Equations.2 and select Properties.

  3. In the Properties window, select Synchronous. Click OK to validate.

  4. Double-click the parameter "a" in the specification tree. The Edit Parameter window is displayed. Enter 2 in the value field. A message is displayed indicating that the equation cannot be solved. Click Close.

  1. Click Close.

  2. Right-click Equations.2 and select Properties.

  3. In the Properties window, unselect the Synchronous check box and select Update relation at global update check box. Click OK to validate.

  4. Double-click a in the specification tree. The Edit parameter window is displayed. Enter 2 in the value field. Click OK.

  5. Double-click b in the specification tree. The Edit parameter window is displayed. Enter 5 in the value field. Click OK.

  6. Double-click c in the specification tree. The Edit parameter window is displayed. Enter 2 in the value field. Click OK.

  7. Right-click the equation in the specification tree and select Local update.

The equation is updated as well as the x value. For the equation to be solved, the Update relation at global update command option must be checked and the relation must be either integrated to the global update or updated manually using the Local Update command.