Defining a Rule in the Rule Tree Editor

To use the Rule Tree Editor dialog box to define a rule, follow this procedure:

  1. Select File | Reporting | New | Report Template to access the Report Template Editor.

  2. Add a TextReportObject, CadReportObject, or a Label object onto the template.

  3. Right-click on the object. A Properties dialog box appears.

  4. Select the Rules Tree property from the Properties dialog box. The Rule Tree Editor dialog box appears. The dialog box displays a list of various items that make up a measurement routine. To expand many of these items, click on a plus symbol (+) to view more specific items or commands. Some items exist on their own and aren't inside of any expanding lists; these items include:

  1. Define the conditions to be met.

Then, if this condition evaluated to TRUE, PC-DMIS would use the associated label. Note that you don't need to include the entire IF expression statement. The IF statement is already understood and evaluated in this box.

If the rule ever gets deleted, your script is lost. Store your script in a separate text file if you are concerned about it getting deleted.

  1. Define a label, an expression, or nothing at all to display if the condition or conditions defined are met. With the Edit Rule dialog box open, you can choose one of the following:

  1. When you have filled out the Edit Rule dialog box, click OK. PC-DMIS places the item from the list in a boldface font and inserts the rule for that item at the bottom of the Rule Tree Editor dialog box.

  2. Organize your rules. You can have as many rules as you want for a given command type. If you have more than one rule, PC-DMIS will evaluate the rules in the order that they appear. You can change the evaluation order by selecting a rule and clicking Move Up or Move Down in the Rule Tree Editor dialog box.

  1. Click OK to save the changes you made to the Rule Tree Editor.

  2. Test the rule.

Be aware that a rule assigned to a child element always overrules a rule assigned to a parent element. Also, a rule assigned to a parent node applies to each child element of that node that does not contain its own rule.

You must have an active Internet connection to see this video.

Related Topics:

About Report Expressions

CadReportObject

GridControlObject

Label Object

TextReportObject

Using the Table Format Command