Home Search

DriveWorks Pro 21
Define Variables

Send Feedback

Define Variables

You can use the Variables editor to create rules that you want to use in many places, or just to simplify rules that are getting long by breaking them down into more manageable chunks.

Related variables can be organized into categories to make the structure of your project easier to understand.

The Variables list can be be filtered by using the filter at the top of the list.

Filtering in the Categories column will filter all variables. Filtering in the Variables column will filter on the selected category.

Please see the topic How To Use Filters for more advanced filtering information.

To Create a Variable

  • Click the "New Variable" button on the command bar.
  • Give the variable a name.
  • Click "OK" - the variable is created in the currently selected category.

To Assign a Rule to a Variable

  • Select the variable in either the category tree, or in the variable list.
  • Click the "Build" button on the command bar to launch the rule builder.
  • Build the rule and click "OK".

See Writing Rules for more information.

To Rename a Variable

  • Select the variable to rename in either the category tree, or in the variable list.
  • Click the "Rename" button on the command bar.
  • Enter the name of the variable.
  • Press Return to confirm the name change.

Renaming a variable will scan all rules and replace any occurrence of the old name with the new name.

If DriveWorks detects that this could cause a delay, then the following message will be displayed.

To Delete a Variable

  • Select the variable to delete in either the category tree, or in the variable list.
  • Click the "Delete" button on the command bar.

To Create a Category

  • Click the "New Category" button the command bar.
  • Give the category a name.
  • Click "OK" - the category is created as a child of the currently selected category.

To Assign a Variable to a Category

  • Find the variable in the category tree
  • Click and drag it into the category you want to assign it to.

To Move a Category

  • Find the category in the category tree.
  • Click and drag it to the new parent category.

To Delete a Category

  • Select the category to delete in the category tree.
  • Click "Delete" on the command bar - the category is deleted, and all of its variables are moved into the deleted category's parent category.
If you delete a category which has child categories, you will be asked whether you want to delete  them as well.

To Apply an Image to a Category

  • Select the category to which to apply an image.
  • Click "Set Category Image..." to browse for an image to apply.
Assigning images to category can be a great way of documenting the purpose of a group of variables, for example, you could browse for an image that documents the engineering calculations that are implemented by the rules.
DriveWorks will also recognize images placed in a folder named Images that is relative to the location of the project.

If the name of the image is the same as a category that exists or is created the image will automatically be displayed.

To Remove an Image from a Category

  • Select the category from which to remove an image.
  • Click "Remove Category Image..." to remove the image.

A dynamic value (text or numeric) determined by a rule.