Creating an Expert Rule  

This task explains how to create an Expert Rule.
In the task below, you create a rule which, whenever a hole has a diameter of 50mm, replaces the hole diameter with a 10mm value. 
  • To perform this scenario, a basic knowledge of the Part Design product is required. 
  • The document Update mode must be set to Automatic.
  1. Create a two-hole pad. One hole must have a 50.0 mm diameter, the other a 10.0 mm diameter.

  2. Access the Knowledge Expert workbench. 

    • Select the root item in the specification tree.

    • In the Start menu, select Knowledgeware > Knowledge Expert.

  3. Click the Expert Rule icon (). The following dialog box is displayed.

  1. If need be, replace the default name and description of the check to be created, the description will be displayed at the first line. Select the KWE Language, then click OK. The expert rule editor is displayed.

  2. Enter the H:Hole 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 get a full description of the available types, see the Reference section of this guide.

  3. 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
        

    The rule editor now looks something like this:

  4. Click OK. A rule is added to the rule set in the specification tree. Click the   icon to solve the rule base. If need be, update the document. Here is what you get onscreen:

  5. Keep your document open and proceed to the next task. 

 

Editing an Expert Rule
About Expert Rules