The rules builder is divided into four sections:
The command bar has the following buttons:
Provides access to the various functions that can be used in rules in the form of simple wizards. Common functions can be quickly accessed by clicking the drop down at the bottom.
Shows previous versions of the current rule and their comments.
Shows a file browser dialog which can be used to easily insert the name of a file into your rule.
Provides a "clipboard" which can be used to save bits of rules that you commonly use. Quick text is saved on your machine so that you can use it across projects to simplify writing similar rules. Quick Text also provides access to Special Variables by clicking the drop down at the bottom.
Shows the tables that are in the project so that they can be used in rules.
Clears the contents of the Rule Editor.
Enables you to customize the fonts and colors used to display rules, and create multiple profiles, e.g. for projectors, laptops, monitors, etc.
Launches the help file.
Saves the current rule.
Cancels the current changes.
The rule editor is where you work with a rule, you can either type your rule directly in the rule editor, or use the function wizards and browsers on the rule builder to insert into the rule.
Rules can be written on a single line or span multiple lines.
Line numbers can be displayed in the Rule Editor window, see Show Line Numbers for more information.
The rule is automatically colored and formatted by DriveWorks using settings which you can modify by clicking the Settings button on the command bar. By default, if the rule is invalid, the background color changes to a light red, and if it is okay, then the background changes to a light green.
All colors are fully customizable, please see Rule Builder Settings for more information.
For more information on writing rules, see the introduction to writing rules.
Autocomplete provides all functions, constants, variables and table names in a pop up window that is filtered as you type in the rule editing window.
Selecting an item from the autocomplete pop up is done by clicking on the required item using the mouse or by using the up/down keyboard arrows to highlight the required item and hitting return, tab or space (pl;aces a space after the selected item) keys.
Bracket matching provides a clear indication of opening and closing parenthesis within rules.
Place the cursor in front or behind any bracket within a rule and bracket matching will highlight the chosen bracket and the bracket it is paired with.
The highlighting color can be fully customized in the settings dialog of the rule builder.
Rules insight gives clear instructions on the arguments required for any function when manually entering the rule in the rule editor window.
As each argument is entered, rules insight highlights in Bold what the next argument should be, giving examples where appropriate.
When typing Functions in the Rule Builder rules insight can be closed by hitting the Escape key on the keyboard.
Rules insight will return when an argument is required, hitting Escape again will close rules insight.
Further functions are available from the right-click menu in the rule editor window.
The functions available depend on the selection made prior to the right-click:
There are up to six tabs on the help and diagnostics section depending on the kind of rule being built:
When building Model or Drawing rules the help tab displays useful information about the type of rule you are building.
This enables you to quickly see what the result of the rule needs to be to achieve the desired outcome. For example when building a rule for a model feature the rule needs to be "Delete" or "Suppress"
The values tab shows any variables and control properties that are being used in the rule, along with their current values, and the current result of the rule.
Shows the steps taken to evaluate the rule along with the value of the rule at each step.
The drill down tab provides the information used in the values and steps to be analyzed by expanding the rule at each stage it takes to get to the result.
Any Rule and Value can be copied from any drill down step.
Right click on the step and select:
DriveWorks color codes various items it recognizes.
The colors used are the inverse of those applied in the Display Item Settings. The color applied to the Foreground Color setting becomes the background color in Rule drill Down.
The result (if applicable) of each item is also shown within the background color.
|Display Item||Description||Default Background Color||Preview|
|Function||The color of any DriveWorks function used in the rule editor.|
|Reference||The color of any Constant, Variable, Special Variable, Table, Control value or hierarchical reference used in the rule editor.|
|Boolean||The color of any TRUE or FALSE value used in the rule editor.|
|Number||The color of any numeric value used in the rule editor.|
|String||The color of all strings within quotes " " used in the rule editor.|
|Operator||The color of any valid operator (+, -, *, /, <, >, =, etc.) used in the rule editor.|
The comments tab provides an area where notes about the rule can be entered.
The comments tab will be headed Comments (Empty) if a rule has no comments.
When a comment is changed a revision is created. See Revisions for more information.
Comments are stored in the Project file, this is copied and loaded during the running of the Project.
We recommend keeping each comment to an absolute minimum, so performance is not affected.
The Function Wizard tab appears when a function is selected from the Functions button.
The name of the tab changes to the name of the function selected.
The wizard for each function provides assistance in providing the necessary information for the function.
See Common Functions for more information on the functions that are available.
There are up to four tabs on the browsers section depending on the kind of rule being built:
Variable categories in the rule builder remain persistent when opening and closing the Rule Builder.
When building rules it is common to reference variables from the same category.
The Rule Builder will retain the last used view for Variables when it is reopened.