In BarTender 2019 and later, you can add sorting rules called Printer Group Mapping Rules to automatically sort printers into Printer Groups without any manual management needed. You can set any number of rules you desire, sorting printers into printable groups or into the blocked group. There is no limit to how many rules you can have.
These rules only apply to new, unsorted printers. Any printers already sorted before the rule was applied will need to be moved manually.
For more information, please see the following:
The default rule
By default, a fresh installation will always have a single mapping rule to sort all printers into the Default Printer Group. This rule cannot be moved, deleted, or modified and will always exist no matter how many rules you've added. This default rule will ensure that any unsorted printers that do not fit any other rule will be usable with BarTender.
How rules are chosen
The sorting process begins at the top of the list and the process goes down the list until a rule matches. Let's work with an example:
The sorting process
Here we have two rules in addition to the default one which cannot be changed. These two rules use regular expressions for their sorting. The first rule blocks all printers that are locally installed on a UserPC and the second rule sorts all Zebra printers into group P2. All other printers fall into the Default category.
For example, we have a Zebra 140 printer that is installed on UserPC134. When attempting to print, the printer enters the ruleset and matches the first rule because the location is contains UserPC like the rule states. The printer is added to the Blocked group even though it is a Zebra printer because it matched the first rule.
Let's say we have another printer, Zebra 110 located on PrintSrv. When the printer enters the sorting ruleset, it does not match the first rule and is sorted by the second one into the group P2.
Take into consideration a third printer, an Intermec. The two set rules do not apply and the printer is sorted into the Default group.
Sorting the rules
When you add rules, they will sort according to their printer groups. However, you can control where these rules sit by using the up and down arrows at the end of the Mapping Rules table:
You can move rules up and down until they suit your needs. You can also right click on the printer rule and select Move Up or Move Down to move the rule.
The default printer rule cannot be moved and will always remain at the bottom of the list.
Creating and modifying rules
You can create a new rule in one of two ways
- click the "Add a new rule" button
- Right click on any rule and select "Add a new rule"
You can edit a rule by doing one of the following
- Click on the pencil icon next to a rule
- Right click on the rule and select "edit the selected rule"
- Double click on a rule
The rule dialog
Whether you're creating a new rule or editing a current one, the dialog looks the same. On this dialog you can set rules according to one or all three printer specifications and assign the rule to sort to a specified group:
You can assign printers to any printer group including Default and Blocked.
Options for matching
You have five different options for how a printer is matched with a rule:
Here are the different sorting options:
- Is / Is not - the rule is set for one specific printer model, location, or port.
- Is any of / is none of - You can create a list of printer models, locations, or ports, separated by a semicolon. The rule compares the unsorted printer to the list you've specified.
- Matches - the rule uses regular expressions (regex) for sorting.
Aside from the default rule, you can delete rules at any time by doing one of the following:
- Click on the red X next to the rule
- Right click on the rule and select "Delete the selected rule"