Using a Rule Base Stored in a Catalog

Knowledge Expert enables you to use rule bases stored in catalogs and to instantiate them. You may choose to apply the rule base to the document (Use only option), to import it and copy it (Import option), and to import it and maintain a link with the original rule base.

Using a Rule Base Stored in a Catalog: Use Only Option   

atarget.gif (1372 bytes) This task explains how to retrieve and apply a rule base stored in a catalog to a document by using the Use Only Option. 
atarget.gif (1372 bytes) The Use Only option enables you to apply the rule base to the document and to solve it.
atarget.gif (1372 bytes)
  1. Open the document you want to import the rule base to (KwxCatalogImport.CATPart for example).

  2. Click the Open catalog icon (). The catalog browser is displayed. Select the KwxCatalogRuleBases.catalog file which contains the rule base to be imported. The Rules family is displayed in the left-hand part of the editor.

  3. Double-click the rule base.

    This dialog box is displayed.

  4. Check Use Only to apply the rule base to the document.

  5. Select the directory in the Select Directory window and click OK.

  6. Click OK twice, then Close.

    The rule contained in the imported rule base is applied to Mypart but the rule base does not appear in the specification tree.

If you have applied parameters to the Expert rules or the Expert checks contained in the Rule Base, they will not be imported, and you will have to re-create them.

 

Using a Rule Base Stored in a Catalog: Import Option    

atarget.gif (1372 bytes) This task explains how to retrieve and apply a rule base stored in a catalog to a document by using the Use Only Option. 
atarget.gif (1372 bytes) The Import option enables you to copy the rule base into the document as well as its sub-components (rule sets, rules, and checks).
ascenari.gif (1364 bytes)
  1. Open the document you want to import the rule base to (KwxCatalogImport.CATPart for example).

  2. Click the Open catalog icon. The catalog browser is displayed. Select the KwxCatalogRuleBases.catalog file which contains the rule base to be imported. The Rules family is displayed in the left-hand part of the catalog window.

  3. Double-click the rule base.

    This dialog box is displayed.

  4. Check Import to import the rule base into the document. Click OK, then Close. The screen below is displayed.

    • The rule base contained in the catalog is imported into the document. In this case, the imported rule base has no link with the rule base of origin and will not be updated if the original rule base is modified.

    • The rule base appears in the specification tree under the Relations node.

     

Formulas cannot be stored in catalogs, only parameters values can be. So, if you have applied a formula to a parameter, only the parameter will be imported together with the rule base.

 Using a Rule Base Stored in a Catalog: Import with Link Option  

atarget.gif (1372 bytes) This task explains how to import a rule base while maintaining the link with the original rule base. 
This scenario is divided into 3 parts:
  • you import the rule base
  • you modify the original rule base and store the result of the solve operation
  • you synchronize the rule base (contained in the KwxCatalogImport.CATPart file) with the original rule base (contained in the KwxCatalog.CATPart file).
atarget.gif (1372 bytes) The Import with Link option enables you to import the rule base as a link and keeps the link with the original rule base. Note that it does not copy the content of the rule base. You can import the rulebase only once. After importing it, you can only synchronize it. No other rulebase can be imported.
The import of knowledge rule bases consists in duplicating a rule base i.e creating  an interactive link between 2 rule bases stored in 2 different files. It implies significant model size reduction, and ensures the use of updated knowledge relations.  

You can:

  • See the structure of the rule base and navigate through it
  • See if the rule base is updated or not (thanks to an icon)
  • See if the rule base is synchronized or not
  • Launch corrective actions, and generate reports
  • Modify settings information (automatic update)
atarget.gif (1372 bytes)
  1. Open the KwxCatalog.CATPart file and create a catalog containing the reference rule base. For more information about catalogs, see Infrastructure User's Guide. Close the Catalog Editor and the KwxCatalog.CATPart file.

  2. Create a part containing holes or open the KwxCatalogImport.CATPart file.

  3. Click the Open catalog icon (). The catalog browser is displayed. Select the catalog you have created. The family you created is displayed in the left-hand part of the editor.

  4. Double-click the rule base family.

    This dialog box is displayed.

  5. Check Import with link to import the rule base into the document. Click OK, and Close.

    The rule base contained in the catalog is imported (with the necessary information only) into the document.

    The rule base appears in the specification tree under the Relations node as well as the rules and checks nested into the database.

    The symbol indicates that the link with the original rule base is maintained.

     

    The symbol indicates that the checks are locked and cannot be modified.

  6. Click the Solve icon () to solve the imported rule base.

  7. Open the KwxCatalog.CATPart file and modify one of the checks.

    • Double-click CATKWECheck.1: the Check Editor opens.

    • In the Condition tab change the value to 15: 
      H.Diameter == 15mm

    • Click the Correction tab, select VB Script in the scrolling list, enter the following correct function and click OK:

    Dim aHole as Hole
    Set aHole = H.parent.Item(H.Name)
    Dim diam As Length
    Set diam = aHole.Diameter
    diam.Value = 16
    MsgBox("Correction performed on "&H.Name)
    • Right-click the rule base and select RuleBase object > Manual Complete Solve to solve the rule base.

    • Right-click  the CATKWECheck.1 check and select CATKWECheck.1 object > Correct Function  to launch the correct function. The following message is displayed for every corrected hole (see opposite).

    • Save the file and close it.

  8. In the KwxCatalogImport.CATPart file, select Edit > Links. The Links of document window opens (see below).

    Click the graphic opposite to enlarge it.

  9. Click and click OK. The rule base is synchronized.

     
  1. Right-click the CATKWECheck.1 and select Correct Function. The correct function is launched.

     
  1. Click the Solve icon: the document is updated (see below.)

     

See also the Creating a customized Toolbar containing a Catalog topic in the Infrastructure User's Guide.