Creating a Check

You can create checks to ensure that some conditions are fulfilled. A check is a multiline statement that you can write either by entering the appropriate syntax directly in the editor box or by selecting items from the editor dictionary list. It is a Boolean expression.

See Also
Creating Sets of Relations
In the Knowledge Base
What are the limitations related to Checks?
  1. From the Compass, click 3D Modeling Apps , and select Engineering Rules Capture.
  2. Create a check. To do so, do the following:
    1. Click Check .
      Note: You may also create a check by clicking the relation set in the tree and clicking Check .
    2. In the Check Editor dialog box, enter a new name.
    3. If needed, add some comments to the Description box.
    4. If you want to add the check to be created to a specific relation set, specify a destination.

      By default, the check is created right below the Relations node.

    5. Click OK.
    6. Select the type of check: Silent, Information or Warning.
    7. Enter the message you want to be displayed in the information or warning box if the check is not verified.
    8. Enter the check statements in the editor
  3. Click Apply to test your check syntax and OK.

Notes:
  • If you access a feature attribute in a check, the modification of the attribute value does not start a new evaluation of the check. Only parameter modifications (parameters available in the Formula editor) start a new evaluation of the check.
  • Checks can be upgraded. Like with other objects using computation algorithms, the upgrade command switches all algorithms used in expressions to the last available version of algorithms. When the relation is modified explicitly, it is automatically upgraded.

Example

Import and open theSample2.3dxml file located in the startup\Knowledgeware\EngineeringRulesCaptureSamples directory.

  1. From the Compass, click 3D Modeling Apps , and select Engineering Rules Capture.
  2. Create a Length type parameter called Line_Length.
  3. Click Formula . Click Line_Length in the tree, click Add Formula and enter: Length(PartBody\Line.1). Click OK twice when done.
  4. From the Compass, click 3D Modeling Apps , and select Engineering Rules Capture.
  5. Click Check . The Check Editor dialog box appears.
  6. Replace the default name with Cylinder_Check. Add comments to the Description box. If you want to add the check to be created to a specific relation set, specify a destination. The check is created right below the Relations node by default.
  7. Click OK. The Check Editor appears.
  8. Select a type of check. Enter the message you want to be displayed in the information or warning box in case the check is not verified.
  9. Enter the check statements in the editor: Line_Length > 16mm
  10. Click Apply to test your check syntax. If the information message appears, the check syntax is correct.
  11. Click OK to add Cylinder_Check to the relations node in the tree. If the line length is inferior to 16 mm, a red icon appears in the tree meaning that the check is not valid.
    Important: Three parameters related to a check are displayed in the "Formulas" dialog box:
    • The activity
    • The severity
    • The result
    When you select the result parameter, the icon indicating whether the check is valid or not appears opposite the value box. Clicking this icon opens the Check editor.