Creating an Expert Rule

You can create expert rules which are sets of instructions, generally based on conditional statements, whereby the relationship between parameters is controlled. In the task below, you create an expert rule which, whenever a hole has a diameter of 50mm, replaces the hole diameter with a 10mm value.


Before you begin: Refer to the Sample topic to create the model you need to perform this scenario.
Related Topics
Editing an Expert Rule
About Expert Rules
  1. Click and select Knowledgeware > Rules > Knowledge Expert.

  2. Click Expert Rule .



  3. If need be, replace the default name and description for the rule to be created. Select the Knowledge Language, then click OK.

    The Expert Rule Editor is displayed.

    Important: If you want to display the Check Language after creating the check, select the check in the specification tree, and select Edit > Properties or Alt > Enter. The Check Language is displayed.

  4. Enter the H:Hole statement in the statement in the area to specify that the rule is to be applied on all the holes and that H will be used as a variable. To do so:


    • Double-click<Add new argument> and enter H.

    • Select the Hole type in the Type scrolling list.

    • Click Apply.

      Note: To get a full description of the available types, see the Reference Information section of this guide.

  5. Copy/Paste the rule below from your browser to the edition box of the editor:

    if (H.Diameter == 50.0 mm) 
           H.Diameter = 10.0 mm  
           else 
           H.Diameter = 20.0 mm

    Important: The editor supports Intellisense which is a form of automated autocompletion allowing you to access available variables, Knowledge types or methods. For example, when you declare a new variable, the list of available known Knowledge types is automatically displayed.

  6. Click OK. A rule is added to the rule set in the specification tree. Click Solve to solve the rule base. If need be, update the document.