Creating an Expert Check

In this scenario, you are going to create an expert check using the Enterprise Knowledge Language which is an extension of the Knowledge language. It enables you to use local variables, and control structures (and, if, then, else, for, while).


Before you begin: Import and open KnowHowReuseSample_001.3dxml located in KnowHowUIRuntime\CNext\startup\Knowledgeware\QCCsamples\Sample001.
  1. From the Compass, click the 3D Modeling Apps quadrant, and select Quality Rules Reuse.
  2. Click Expert Check .
    The Knowledge Engineering Specification Physical dialog box appears.
    Note: If need be, replace the default name and description of the check to be created.
  3. Click OK.
    The Expert Check Editor dialog box appears.
  4. From the Language list, select the Enterprise Knowledge Language and click OK.
    The Expert Check Editor Condition window appears.
  5. Enter the dim statement in the Name area to specify that the check is to be applied on all the dimensions. To do so:
    1. Double-click Add new argument and enter dim.
    2. Select the TPSDimentionAnnot type in the Type list.
  6. Copy/Paste the following syntax from your browser to the editor, and click Apply to test the syntax.
    if(dim.DimensionValue >=15mm)ThisCheck.AddNewTuple(true,dim)else ThisCheck.AddNewTuple(false,dim)
  7. Click OK.
    A check is added to the rule base in the tree.
  8. Click Solve .
    The check icon turns red indicating that the check failed (all the dimensions are not superior or equal to 15mm).
  9. Right-click the check in the tree, and select Checkname object > Highlight Failed Components.
    This highlights the features that do not fulfill the criteria specified in the check.