This window also allows you to add fields as seen in the chapter Concatenation of variables.

In some tools such as BatchConverterWhen file names need 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 you want to convert the drawings in PDF format (*.pdf) and the others in a neutral format such as IGES (*.igs) you will be able to change the name for each format.


 


Click on the icon then in the next window click on the icon 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. By default there is no condition and the rule will always be true for all selected documents.


 


We will add a rule that only drawing files are converted to PDF.

To access the conditions window we will click on the icon :  

Several choices are offered. For our example we will select the option "Following the extension"   and specify that the rule will be true only for files with extension "*.slddrw" (drawing). We add another condition depending on the value of the property  "Comments".


 


The "Conditions" column now indicates that  "2 conditions are defined".  

The rule will be executed if and only if both conditions are met!


Now let's add a second rule to name the other selected SOLIDWORKS files.

This icon bar allows you to add, 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 is no limit to the number of rules you can create, but be careful not to put too many in because it can get complicated!

The rules are processed in the order they were created, if you want to change it use the arrows after selecting the rule to move (UP/DOWN on the right).


This other icon bar allows :

  • To save a rule favorite so that it can be recalled for other treatments.
  • Specify where you want to save these favorites.
  • To recall a favorite.


After validation, the zone no longer indicates the renaming field but tells us that rules have been defined. To access these rules click on the icon .

So for processing the selected SOLIDWORKS files, the BatchConverter tool will convert the drawings to PDF format and the other files to IGES format as requested.