Add/Remove rules
This window can also be used to add fields, as described in chapter Concatenation of variables.
In some tools, such as BatchConverterWhen file names are to be renamed, it is possible to add advanced rules to follow conditions for this modification. The file name will be generated differently according to certain rules.
For example, in BatchConverter, if you have selected a list of documents (part, assembly, drawing) and wish to convert the drawings into PDF format (*.pdf) and the others into a neutral format such as IGES (*.igs), you can modify the name for each format.
Click on the then in the next window click on the to add one or more rules.
Example :
Here we have 1 file name definition. If we leave it in this state, all files will be converted to PDF format. By default there are no conditions and the rule will always be true for all selected documents.
We'll add a rule so that only drawing files are converted to PDF format.
To access the conditions window, click on the icon :
Several choices are available. For our example, we will select the "Following the extension and specify that the rule will be true only for files with the extension "*.slddrw" (drawing). We add another condition based on the value of the "Comments".
The "Conditions" column now indicates that "2 conditions are defined".
The rule will be executed if and only if the 2 conditions are met!
Now let's add a second rule to name the other selected SOLIDWORKS files.
This icon bar lets you add or delete a rule. .
We will define the following rule for all other selected files (Parts, Assemblies).
The window now indicates that rules have been created.
There's no limit to the number of rules you can create, but be careful not to overdo it, or it can get complicated!
Rules are processed in the order in which they were created; if you wish to change this, use the arrows after selecting the rule to be moved (UP/DOWN on the right).
This other icon bar allows you to :
- Save a rule favorite so that it can be recalled for other treatments.
- Specify where to save these favorites.
- Recall a favorite.
After validation, the field no longer shows the rename field, but indicates that rules have been defined. To access these rules, click on the icon .
Therefore, when processing the selected SOLIDWORKS files, the BatchConverter tool will convert the drawings to PDF format and the other files to IGES format as requested.