The Extract Variable function allows variables to be created directly from the Rule Builder.
Anything entered in the rule editor can be extracted to create a new variable.
Any occurrences of the selection can be searched for in every rule within the project, and be replaced with the new variable.
To extract a portion of the rule you are currently building to a variable, in the rule builder:
Right click on the highlighted portion and select Extract Variable.
The field where the name is entered gives feedback on validity by remaining red when there is an error, and turning green when the name is acceptable.
The OK button on the Extract variable dialog will be disabled until a valid name is entered.
Causes of unacceptable variable names include:
If the rule (to be extracted to the variable) occurs in other ares of the Project, each occurrence can be replaced with the new variable.
Check the box marked Replace in all rules.
Click OK.
De-select any instance that is not required to be changed.
When the review is complete, click OK to apply the changes.
Replace in rules dialog
The results are displayed with the following information:
All found occurrences will be selected by default. To exclude an occurrence from the change uncheck this column.
This is the name of where the occurrence was found.
For instance: the name of a Variable, a Control Property, a Document or Model Parameter, etc.
This displays the existing full rule, with the portion that has been found highlighted.
This displays the modified full rule, with the portion that will be modified highlighted.
This is the parent type.
For instance: Variable, Control, Document or Component Sets, etc.
This is the full path to where the occurrence was found.
The filter box allows the results to be filtered.
For example:
To display just variables, enter:
Type: Variables
Replace In Rules is also available directly from the Rule Builder (without requiring to Extract Variable).
DriveWorks Quick Tips | |
DriveWorks Quick Tips: Search and Replace Rules We’ve all done it, we made a few rules with a constant number, thinking that it’s only one or two rules. Then it becomes 10… and then its 50, and then suddenly that value needs to be changed. Now you need to find all the rules that have that value and replace them with the right value, but the rules are long and complex and searching each one will take hours! This is where DriveWorks has your back. | |
DriveWorks Quick Tips are a series of 1 minute videos, available on YouTube, that explain specific functionality. View all Quick Tips |