DriveWorks Solo 15: Rules Builder [send feedback...]

Introduction

Rules
Builder

The rules builder is divided into four sections:

  1. The command bar at the top.
  2. The rule editor in the middle.
  3. Help and diagnostics at the bottom.
  4. Browsers for variables etc on the right.

The Command Bar

The command bar has the following buttons:

  • Functions - 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.
  • Revisions - Shows previous versions of the current rule and their comments.
    Revisions can store a maximum of 2000 characters. If the Rule is over this the rule will be truncated to the first 2000 characters in the revision history. A warning message will be displayed in the rule window when the rule will be truncated in the revision history.
  • File... - Shows a file browser dialog which can be used to easily insert the name of a file into your rule.
  • Quick Text - 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.
  • Tables - Shows the tables that are in the project so that they can be used in rules.
  • Clear - Clears the contents of the Rule Editor.
  • Settings - Enables you to customize the fonts and colors used to display rules, and create multiple profiles, e.g. for projectors, laptops, monitors, etc.
  • Help - Launches the help file.
  • OK - Saves the current rule.
  • Cancel - Cancels the current changes.

The Rule Editor

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.

The rule is automatically colored and formatted by DriveWorks Solo 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.

For more information on writing rules, see the introduction to writing rules.

Auto-Complete

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

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

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.

Right-click menu

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:

  • Edit Variable - Available when a variable is selected. Allows the rule of the selected variable to be edited in a separate rule builder window. See Edit Variables for more information.
  • Extract Variable - Available when highlighting a portion of the data. Allows the selection to be extracted to a new variable. See Extract Variables for more information.
  • Replace In Rules - Available when highlighting a portion of the data. Will launch the Replace In Rules dialog that allows any instance of the selection to be replaced with a new value.
    This feature is not supported when editing document rules.
  • Find All References - Available when a named reference is selected. Will return a list of every rule in the project that uses the selected item. The Usage results can then be modified.
  • Cut, Copy, Paste, Delete - Provides standard cut, copy, pasted and delete functions.
  • Find/Replace - Provides Find/Replace functionality for the current rule editor window.
  • Select All - Will select all data in the rule editor window.

Help and Diagnostics

There are up to four tabs on the help and diagnostics section depending on the kind of rule being built:

  1. Help (not shown for control properties or variables) - Shows useful information about the type of rule you are building, e.g. if you are building a rule for a model's file name, Help will show you common examples of rules for file names.
  2. Values - Shows any variables or control properties that are being used in the rule, along with their current values, and the current result of the rule.
  3. Steps - Shows the steps taken to evaluate the rule along with the value of the rule at each step.
  4. Comment - Enables you to attach some descriptive text which is stored with the rule to document the intent of the rule.

Browsers

There are up to four tabs on the browsers section depending on the kind of rule being built:

  1. Controls - Shows all of the controls in the project. You can filter to a specific form to find a control, and double click it to use its return value in the rule. You can also single click the control and double click one of its other properties to use that property in the rule.
  2. Variables - Shows all of the variables in the project. You can use the search box to find the variable you are looking for, and double click it to use it in the rule.

    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.

  3. Components - Only shown for model file name rules, for more information see How To: Replace a Component With a Static or Driven Replacement Model.
  4. Replacements - Only shown for model file name rules, shows any models that have been captured as Replacement Models.

Table of Contents