SCHLIB过滤器面板

您正在阅读的是 1.1. 版本。关于最新版本,请前往 SCHLIB过滤器面板 阅读 4 版本

This documentation page references Altium NEXUS/NEXUS Client (part of the deployed NEXUS solution), which has been discontinued. All your PCB design, data management and collaboration needs can now be delivered by Altium Designer and a connected Altium 365 Workspace. Check out the FAQs page for more information.

 

Parent page: Sch Panels

Quickly locate and highlight Schematic Library objects using logical queries in the SCHLIB Filter panel.Quickly locate and highlight Schematic Library objects using logical queries in the SCHLIB Filter panel.

Summary

The SCHLIB Filter panel allows you to construct filters through the creation of logical queries. A defined filter can then be applied to the active schematic library component or all components in the active schematic library, allowing you to select and edit multiple objects with greater accuracy and efficiency. The visual display of objects can be specified based on those that match the search criteria of the filter and those that do not.

For more information about queries, see the Query Language Reference page.

Panel Access

The panel is accessed in the following ways:

  • Click the Panels button at the bottom-right of the workspace then select SCHLIB Filter.
  • Click View » Panels » SCHLIB Filter from the main menus.
  • Use the F12 shortcut key.
Panels can be configured to be floating in the editor space or docked to sides of the screen. If the SCHLIB Filter panel is currently in the group of docked Workspace panels on the left, use the SCHLIB Filter tab located at the bottom of the panels to bring it to the front.

Defining Filter Scope

The left-hand region of the SCHLIB Filter panel contains controls for defining (limiting) the scope of the filter.

The scope options are:

  • All Objects - apply the filter to all design objects.
  • Selected Objects - apply the filter only to those design objects that are currently selected.
  • Non Selected Objects - apply the filter only to those design objects that are not currently selected.
  • Whole Library - control whether filtering is applied to just the active component (option disabled) or to all components in the active schematic library document (option enabled).

Defining Filter Queries

The central region of the SCHLIB Filter panel allows you to construct filters through the entry of logical queries.

You can type a query directly into the field, and as you type, a prompt list of possible keywords will appear as an aid.

Query Helper

Along with the prompt list, the panel also offers the Query Helper facility to provide aid in the creation of queries. This facility can be very useful if you are unsure of the syntax of a query or the possible keywords that you may want to use. To use the Query Helper, click the Helper button to open the Query Helper dialog. The underlying Query Engine analyzes the document and lists all available objects, along with generic keywords for use in queries.

Use the top section of the dialog to compose a query expression using the available SCH Functions and System Functions. The middle region of the dialog provides a range of operators for use when constructing an expression. Use the Check Syntax button to verify that an expression is syntactically correct.

When the expression for the query has been defined as required, click OK to load the query into the central region of the SCHLIB Filter panel. Apply the filter using the Apply button.

The above example finds digital power pins for the current component, or more usefully, for all the components in the active library when the panel's Whole Library option is enabled. Using the And expression, it filters pins that are of the Power type (PinElectrical = 'Power') and have a name prefix of 'D' (Name Like 'D*').

When applied to the whole library, pins that satisfy the filter will be highlighted for all other components as shown in the following image.

For more information on applying filters, see the Applying and Clearing a Filter section below.

Historical Queries

Additional buttons in the lower region of the SCHLIB Filter panel provide access to previously used and favorite (stored) queries.

As you enter and apply a new query, it will be added to a query history list. Click the History button to access this list. The Expression Manager dialog will open with the History tab active.

To use an historical query from the list, either select its entry and click on the Apply Expression button or double-click on the entry directly. The dialog will close and the expression for the query will be loaded into the central region of the SCHLIB Filter panel.

An historical query can be added to the list of favorite queries by selecting its entry then clicking the Add To Favorites button. Use the Clear History button if you want to 'flush' the history list. Up to nine of the most recently used query expressions from the list will be available for use from the panel's right-click menu.

Note that the content of the History list is common to (and accessible from) both the SCHLIB Filter and the SCH Filter panel.

Favorite Queries

Any defined query may be added to a list of favorite queries in two ways:

  • By using the Add to Favorites command from the panel's right-click menu to add the query expression currently defined in the central region of the panel.
  • By selecting an historical query entry in the History tab of the Expression Manager dialog then clicking the Add To Favorites button.

Click the Favorites button in the SCHLIB Filter panel in order to access this list. The Expression Manager dialog will open with the Favorites tab active.

To use a favorite query from the list, either select its entry then click on the Apply Expression button or double-click on the entry directly. The dialog will close and the expression for the query will be loaded into the central region of the SCHLIB Filter panel.

When a query expression is added to the favorites list, it is assigned a unique name. By default, a generic name is assigned - Favorite_n - where n is the next available unused number. The name for an entry can be changed at any stage by using one of the following methods:

  • Select the query entry then click the Rename button.
  • Select the query entry then choose the Edit command from the right-click menu.
  • Select the query entry then click again within the Name field.

In each case, type the new name as required then click outside the Name field to effect the change.

To remove a query from the favorites list, select its entry in the list then either click the Remove button or choose the Remove command from the right-click menu. A dialog will appear requesting confirmation of the removal. Up to ten of the most recently added query expressions to the list will be available for use from the top of the panel's right-click menu. Note that the content of the Favorites list is common to (and accessible from) both the SCHLIB Filter and the SCH Filter panel.

Defining Filter Highlighting

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

The Objects passing the filter 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 (default), the filtered objects will be selected in the workspace.
  • Zoom - when enabled (default), the filtered objects will be zoomed and centered (where possible) in the library editor window. The zoom action can be determined by the Zoom Library Components options set in the Schematic - Library AutoZoom page of the Preferences dialog.

Conversely, the Objects not passing the filter options allow you to control how all objects that do not fall under the scope and/or match the specific query expression of the filter will be visually displayed in the workspace.

  • Deselect - when enabled (default), all objects not falling under the scope of the filter will be deselected in the workspace.
  • Mask out - when enabled (default), all objects not falling under the scope of the filter will be masked within the library editor window. 

Applying and Clearing a Filter

Once you have defined a query and set up the options in the panel as required, the filter can be applied by clicking the panel's Apply button or pressing Enter.

To clear the currently-applied filter from within the panel, clear (select and delete) the query expression in the central region of the panel then either click the Apply button or press Enter. All objects in the design workspace will be restored to full visibility and be available for selection/editing.

To clear filtering in the workspace and leave the query expression loaded into the central region of the panel, use the Clear Current Filter button () on the Sch Lib Standard toolbar (shortcut Ctrl+C).

Right-Click Menu

Right-clicking within the SCHLIB Filter panel provides access to additional options and commands via a pop-up menu.

The menu provides the following commands:

  • Add to Favorites - use to add the query expression currently displayed in the central region of the panel to the list of favorite queries. The query will appear as a new entry on the Favorites tab of the Expression Manager dialog. As a query is added to the list of favorite queries, it will be displayed at the top of the right-click menu. The ten most recently added queries to the favorites list will be displayed on the menu (most recent at the top), enabling you to quickly access and reuse your favorite query expressions.
  • Organize Favorites - use to access the Favorites tab of the Expression Manager dialog in which you can organize (rename, delete) entries in the list of favorite queries.
  • Examples - click to access a sub-menu of predefined example filters. Choosing an example filter will load the associated, underlying query expression into the central region of the panel.
  • History - click to access a sub-menu containing the nine most recently used query expressions taken from the query history list for the panel. Click on the More entry to access the History tab of the Expression Manager dialog in which you can browse through and apply a query from the full list of historical queries and also clear the history list as required.
  • Show Scope Options - use to toggle the display of the filter scope region of the panel.
  • Show Masking Options - use to toggle the display of the filter highlighting region of the panel.
The top entries in the right-click menu offer a selection of the current Favorites. Click on an entry to load it into the panel.

Keep in mind that the content of both the Favorites and History lists is common to (and can be populated from) both the SCHLIB Filter and the SCH Filter panel. Some query expressions may not return results when used in the schematic editor especially if they have been created to target objects that are available within the Schematic Library editor only.

Tips

General

  • Pressing the F12 key will toggle the visibility of the panel in the workspace.
  • Filtering applied when using Queries from the SCHLIB Filter panel is permanent for the session. A permanent filter must be cleared by a corresponding Clear action (applying an empty query from the SCHLIB Filter panel).
  • Depending on the shape and size of the SCHLIB Filter panel itself, the content will be dynamically arranged horizontally or vertically.

Building Query Expressions

  • It is highly advisable to use brackets whenever there is any possibility that the query might not be correctly interpreted.
  • Brackets have the highest precedence within an order of precedence that has been defined for the various operators provided and which determines how queries are interpreted by the software (whenever the user has not provided brackets). The sequence of this order is as follows:
      Brackets
      Not
      ^, *, /, Div, Mod, And
      +, -, Or, Xor
      =, <>, <, >, <=, >=
      &&, ||
    This order of precedence is similar to that used in Pascal type languages. However, generous usage of brackets removes doubt and makes the resulting queries easier to read by others.
  • Ambiguities are resolved by working from left to right.
  • Parentheses are evaluated from inside to outside and equal levels are done left to right.
If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Content