Applied Parameters: LaunchMode=UnderCursor
Summary
This command is used to access the Building Query from Board dialog, more commonly referred to as the Query Builder dialog. This dialog enables creation of a query, based on the object currently under the cursor, for targeting specific objects in the design document, by simple construction of a string of ANDed and/or ORed conditions.
Access
This command can be accessed from the PCB Editor, and PCB Library Editor, by right-clicking over the required object in the main design workspace, and choosing the Build Query command from the context menu.
Use
After launching the command, the Building Query from Board dialog will appear. Use this dialog to create a simple query to target the set of objects required on the document. The conditions and related values will be sensitive to the type of object under the cursor and you will only be able to build a query using conditions possible for that object type.
The left-hand section of the dialog is used to specify the condition(s) required to target the set of objects needed. As a condition is defined, a preview of the currently built query is shown in the right-hand section of the dialog. Conditions can be ANDed and/or ORed together, and precedence incorporated (through the use of brackets) to refine the set of targeted objects.
The dialog also contains additional controls, allowing you to define how the resulting set of filtered objects will be visually displayed in the main design window (zoom, select, apply masking). Click the Apply button to apply the filter using the constructed query - enabling you to test if the query meets your needs.
Options are also available to run the editor's Inspector panel upon applying the query, and to also create an expression, which copies the query you have built to the Filter region of the editor's Filter panel, from where you can modify it as desired, using advanced query-building facilities.
Tips
- The actual name of the dialog will depend on the specific object under the cursor when you launch the command.
- When accessed in the PCB Library Editor, you can also opt to have the query expression applied to the entire library, or just the active component.
- The currently selected condition, or logical operator, on the left of the dialog, is visually confirmed in the preview section on the right, by the entry appearing in red text.
- The Query Builder is often used wherever there is a need to construct logical query expressions - for example in a filter panel, or when defining scoping of design rules. It 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.
- A quicker method of building a filter, based on the template object under the cursor, is to use the Find Similar Objects feature.