Enhanced PCB Filtering

Old Content - visit altium.com/documentation

The PCB Filter and PCBLIB Filter panels have been given a complete overhaul in Altium Designer 14.3, streamlining your ability to locate objects in a design or library, and to select those objects ready for editing. The panels now provide a quick means of building simple filters based on object type selection, as well as the more traditional use of free-hand construction of expressions, for more advanced filtering. The result is that you can pinpoint the required objects with the same great accuracy and efficiency you've come to rely on through each panel, but doing so with a fresh, more intuitive interface.

Same Name, Different Face

They're still the PCB Filter and PCBLIB Filter panels. And they're still accessed in the usual ways. But the moment you do access either panel, you'll observe a sleak new interface – especially if you are a seasoned Altium Designer user and know the panels of old.

To display the PCB Filter panel for the active PCB document, or the PCBLIB Filter panel for the active PCB Library document, simply click the PCB button at the bottom-right of the main design window, and select the PCB Filter or PCBLIB Filter entry from the menu, respectively. Alternatively, access the panel from the View » Workspace Panels » PCB sub-menu, or use the F12 keyboard shortcut.
Note that both panels are now solely vertical in their orientation of layout. Each panel no longer has the ability to change its interface to fit a horizontal panel layout, and therefore horizontal docking (to the top or bottom of the main application window) is no longer suitable.

The new-look PCB Filter and PCBLIB Filter panels.

With the PCBLIB Filter panel, use the Filter The Whole Library option to control whether filtering is applied to just the active component (option disabled) or to all components in the active PCB library document (option enabled).

The following sections take a look at the interface and use from the perspective of the PCB Filter panel. The interface and operation of the PCBLIB Filter is essentially the same. Where specific differences exist, these are highlighted where applicable and appropriate.

Building Simple Filter Expressions

The main region of the panel provides controls for quickly building simple filter expressions targeting any combination of objects. Object types are arranged in an 'object matrix', categorized in accordance with being net objects (Net), component objects (Comp), or free objects (Free). The following core object list is replicated across these three groups:

  • Track
  • Arc
  • Via
  • Pad
  • Fill
  • Region

The Text object is available as part of the Comp and Free groupings, but, as this object type is not net-aware, it is not part of the Net grouping. In addition, the Free grouping also includes: Component, ComponentBody, Room, and Polygon.

For the PCBLIB Filter panel, the Net and Comp groupings are not presented, nor the Component and Room object types.
The order of the columns is customizable. Simply click on a column's header and drag it horizontally to the required new position. Valid positions are highlighted by green positional arrows.

To use an object in the construction of a filter expression - thereby filtering by that object - simply enable the relevant check box associated with that object, within the object matrix. Commands available on the right-click context menu for the region enable you to quickly check or uncheck all entries in the matrix, or toggle the state of all checkboxes in the matrix, respectively.

Clicking on an object's name entry will cause all checkboxes associated to it in the matrix to become checked. Clicking again will cause all to become unchecked. Alternatively, click and drag - either in the object name colum, or in a particular group column - to check/uncheck multiple entries at once. Note that if selecting in this way includes at least one unchecked box, those unchecked boxes will become checked, and the boxes that were already checked will remain checked. However, if all boxes were already checked, the result will be to uncheck all boxes involved in the selection.

Use the Layer region of the panel to restrict the filter to a particular layer, or layers, or a specific class of layers. The entries listed reflect:

  • The defined layer classes for the board, the default of which are:
    • <All Layers>
    • <Component Layers>
    • <Electrical Layers>
    • <Signal Layers>
  • The defined layers in the layer stack (as presented in the Layer Stack Manager dialog).
  • The top and bottom paste mask layers.
Multiple layers can be selected for inclusion into the filter, by toggling the associated check box for each required layer accordingly.
The Layer region will automatically update if additional layer classes have been defined, or user-defined layer class names have been changed, through the Object Class Explorer dialog. It will also update to reflect any changes to layers in the layer stack.
For the PCBLIB Filter panel, layer classes will not be presented in the Layer region.

As you make your filtering selections, the resulting query expression is built dynamically, and presented in the Filter region of the panel. Once the filter query expression has been defined as required, you then need to apply it as a separate action. Do this using the Apply button at the bottom of the panel. Alternatively, if you require application to only those objects that are currently selected in the workspace, use the Apply to Selected button instead.

The number of objects passing the filter - the number that remain displayed in the workspace - is indicated at the bottom-left of the panel. If no filtering is currently applied, this is reflected by the entry Not filtered.

Example of quick, simple filtering in action, with the resulting query expression - used by the filter engine - built only from objects and layer(s) specified.

Building Advanced Filter Expressions

The Filter region of the panel allows you to build filters of any complexity through the creation of logical query expressions.

While the upper regions allow a simple filter expression to be quickly built, more advanced expressions can be constructed. Advanced query expressions can be defined in the following ways:

  • Typing a query directly into the main expression window. As you type, a prompt list of possible keywords will appear as an aid.
  • Using the Query Helper (click the Helper button). Once launched, the underlying Query Engine analyzes the document and lists all available objects along with generic keywords that can be used in queries.
  • Using the Query Builder (click the Builder button). The Query Builder enables creation of a query for targeting specific objects in the design document, by simple construction of a string of ANDed and/or ORed conditions.
  • Modifying the expression obtained through simple object/layer selection in the regions above.
The Query Builder is a simpler method of constructing a query, using sensitive condition types and values that only allow a query to be constructed using relevant 'building blocks'. For advanced query construction, with full keyword specification and operator syntax, use the Query Helper.

Again, once you have defined your filter query expression, you then need to apply it by clicking the Apply button (or the Apply to Selected button for application of the filter to currently selected objects only).

Once you start to define (or modify) a query expression directly in the Filter region of the panel, the upper regions (building filters through object/layer selection) become disabled. To reinstate the previous simple filter expression, simply click once inside the Select objects to highlight, or Layer regions. Doing so will liven these regions, ready to adjust the simple filter as required.

Example application of a more advanced filter, with the query expression entered directly into the Filter region of the panel. Again, the number of filtered objects is reflected at the bottom-left of the panel.

Filter Highlighting

Before application of the query in the panel, it is best to define how you wish the result of the filtering to appear visually in the design workspace. The lower region of the panel provides various options which collectively form the highlight controls for permanent filtering.

The Matching options allow you to control how all objects that fall under the scope, and match the specific query expression of the filter, will be visually displayed in the workspace:

  • Select - when enabled, the filtered objects will be selected in the workspace.
  • Zoom - when enabled, the filtered objects will be zoomed and centered (where possible) in the main design window.

Conversely, the Non-matching options allow control over the visual display - in the workspace - of all objects that do not fall under the scope and/or do not match the specific query expression of the filter:

  • Deselect - when enabled (default), all objects not falling under the scope of the filter will be deselected in the workspace.
  • Normal/Mask/Dim - this dropdown provides you with the following options for visibly contrasting filtered and unfiltered objects within the design editor window:
    • Normal - filtered objects are highlighted, however, the appearance of unfiltered objects remains unchanged.
    • Mask - filtered objects will appear visible in the design editor window, with all other objects being made monochrome. When this option is applied, unfiltered objects will be unavailable for selection or editing.
    • Dim - filtered objects will appear visible in the design editor window, with all other objects retaining their colors, but being shaded.
The effectiveness of masking and dimming is determined by the Highlighting Options set on the PCB Editor - Display page of the Preferences dialog. Controls for adjusting masking and dimming are accessed from the Mask Level button (bottom right of design editor window).

Clearing the Current Filter

The currently applied filter can be cleared in a number of ways:

  1. Click the Clear button, at the bottom left of the panel.
  2. Click the Clear button, at the bottom-right of the main design window.
  3. Press the Shift+C shortcut keys.
  4. Clear the entry for the current expression and press Enter, or click the Apply button.
Methods 1, 2 and 3, clear filtering in the workspace only. The 'setup' of the panel remains as it was, enabling you to quickly re-apply the filter expression. Method 4 also clears filtering in the workspace, but does mean the filter expression is no longer present in the Filter region. However, the 'setup' in the Select objects to highlight and Layer regions remains. Simply click anywhere in one of these regions to re-load the Filter region with the expression, ready to apply.
Shift+C in the workspace can only be used to clear the active filter in 2D Layout Mode. Filtering will not be cleared using this shortcut when in Board Planning Mode, or 3D Layout Mode.

Favorites & History

Over time, a number of useful query expressions will be constructed in the course of laying out various boards. Typically, a designer will want to apply and re-apply the same queries, not only in the same design, but across different designs. To cater for this, the panel supports the notion of Favorite and Historical queries.

As a query is entered and applied from the panel, it will be added to a query 'history list'. In addition, that query can be added to a query 'favorites list', by clicking the Add To Favorites button, below the filter expression window. Use the History and Favorites buttons in the panel to access the corresponding tabs of the same name within the Expression Manager dialog, to see these lists.

Access a history of applied query expressions and build a listing of favorite expressions to be reused time and again.

 

Make a historical expression a favorite one by selecting it and clicking the Add To Favorites button.
When a query expression is added to the favorites list, it is assigned a unique name in the default format Favorite_n, where n is the next available unused number. Change this to a more meaningful name – for example a name that conjures the intent of the expression.

To use an expression in either list, simply double-click on its entry, or select its entry and click the Apply Expression button. The Expression Manager dialog will close and the expression will be loaded into the panel and applied automatically.

When applying an historical query expression, the object and layer regions of the panel will become disabled. When applying a favorite query expression, and that expression was created using the object/layer simple filtering and added directly to favorites, then those regions of the panel will remain editable once the expression has been applied.
Flush the historical queries list by clicking the Clear History button, on the History tab of the Expression Manager dialog. To remove a favorite query, simply select it on the Favorites tab of the Expression Manager dialog, and click the Remove button.

Creating Design Rules

The panel also provides the facility for creating a design rule, the scope of which uses the currently defined query expression.

To add a new design rule, click on the Create Rule button, located in the cluster of buttons beneath the filter expression window. The Choose Design Rule Type dialog will appear. This dialog lists each of the rule categories and rule types that are available in the PCB document. Simply choose the type of rule to be created and click OK (or double-click directly on the entry).

The PCB Rules and Constraints Editor dialog will appear. A rule of the chosen type is created and the main editing window for the rule is displayed, ready to define specific constraints for the rule. The query expression from the panel is entered into the Full Query region of the dialog.

 

You are reporting an issue with the following selected text and/or image within the active document: