PCB Inspector
Contents
The natural partners to the PCB Inspector panel are the PCB Filter panel and the PCB panel:
Parent page: PCB Panels
Summary
The PCB Inspector panel enables you to interrogate and edit the properties of one or more design objects in the active PCB document. When used in conjunction with appropriate filtering, the panel can be used to make changes to multiple objects of the same kind, from one convenient location. The panel is a natural partner to the PCB Filter panel.
Panel access
Access the PCB Inspector panel by:
- Clicking View | PCB | from the main menus.
- Using the F11 keyboard shortcut.
Defining panel display scope
The PCB Inspector panel allows you to define which objects are displayed in the panel (the display scope) via filtering controls. This can be accessed using the underlined control at the top of the panel.
You may have a large quantity of objects selected in the workspace that are of differing type. Out of all such objects, you may wish to edit the properties of certain object types only, without losing or having to alter your selection.
Use the Include link context menu to choose which object types to include in the panel for display and editing - either all objects or specific objects. To choose one or more specific object types, enable the Display only option and then enable the check box next to the required object(s) in the list beneath. The list will only contain those object types currently selected in the main workspace.
When specific object types have been enabled for display, the control will reflect the choice by listing the enabled types, separated by commas.
Inspecting object attributes
The main regions of the PCB Inspector panel show sections of attributes for objects falling under the defined display scope.
Clicking on a single object in the PCB design editor window will select that object and display its associated attributes in the PCB Inspector panel. Information is displayed under the following common collapsible sections:
Kind
This panel section contains one entry only, relating to the kind of design object that is being 'inspected'. For example, clicking on a component in the workspace will display the entry Component
, clicking on a component designator will display the entry Text
, and so on.
Object Specific
This section contains attributes specific to the object being inspected and which are not graphical attributes. For example, selecting a component will display the following attributes that are specific to a component:
- Layer
- Name (the component designator)
- Component Comment
- Lock Strings
- Footprint
- Channel Offset
- etc...
Other selected objects will have different attributes displayed. For example, selecting a pad object will display attributes including Pad Shape/Size, Solder Mask Tenting
and Electrical Type
.
Graphical
This section of the panel contains graphical attributes of the selected object. Attributes here may include the location of the object, its rotation and dimensions, and whether it is locked.
Editing object attributes
The attributes of a selected object can be edited through the relevant entry in the panel. The change will take effect once you click outside of the field being edited. This is one of the advantages of using the panel to edit object properties – the panel will remain open, allowing you to change attribute after attribute, as needed, without having to close and reopen an object's properties dialog each time.
If the object being inspected has child objects associated with it, they will appear in blue in the Object Specific section (rather like a hyperlink). When the Inspector is set to Include all types of objects, the child objects themselves can be edited in the panel.
Click on these entries to display the attributes pertaining specifically to these child objects, as illustrated in the image below (where two LED components are selected). For each child object, a link will be available back to the parent object – in the below case, the Component link returns the panel to the parent (component) object.
A main advantage of using the panel for editing is that multiple objects can be edited from the one place, without having to edit, through dialogs, one object at a time. Selected objects can be of the same or differing type. Those attributes that are common to all objects in the selection will be displayed in the panel. Common attributes that have differing values between objects will be displayed as <...>
. As the attributes are edited as required, the changes made will be conveyed instantly to each object in the selection.
Filtering can be used to target a specific group of objects in the design and the PCB Inspector panel then used to edit the attributes for these multiple objects, directly.
Editing attributes with numeric values
For a numerical-based attribute of a selected object, the simplest modification to that attribute's value is made by typing a new value to replace the existing one. The plus and minus operators can be used to specify the value's sign. A value entered without a specified sign is assumed to be positive. Therefore entering 20 is the same as entering +20.
A value can be entered with specific units of measurement and the software will convert the value into the current units defined for the document. If no units are specified, the default units set for the document will be used.
Batch replacement of string-based attributes
There are occasions when it's desirable to modify a string-based attribute that is common to multiple selected objects. For example to rename the designators of selected header components from P1, P2, P3, etc, to HDR1, HDR2, HDR3, etc. To perform this type of batch replacement, the use of string substitution syntax is supported in the panel.
A string substitution entry is enclosed in braces and has the form: {oldstring=newstring}
An entry of this form causes all occurrences of 'oldstring' found in the attribute's value to be replaced with 'newstring'. In the case of the designators, you would enter {P=HDR)
in the value field for the Name attribute.
Should you wish to replace multiple, differing string portions in the same target string, type multiple substitution entries, with each enclosed in its own set of curly braces. For example, consider the following free text strings placed on the PCB of a design featuring four USB ports and connector headers, where each port supports the USB2 standard:
HDRA_2
HDRB_2
HDRC_2
HDRD_2
If the design has now been revised to support the USB3 standard and the name prefix needs to be changed to USB-
for clarity, batch string substitution can be used to modify the free strings to USB-A_3
, USB-B_3
, etc in one action.
With all relevant strings selected and the PCB Inspector Panel open, the String attribute value would be ented as {HRD=USB-} (2=3}
. The software takes this entry and effectively performs a batch substitution – substituting for the first expression, then the second.
Smart Editing of string-based attributes
The PCB Inspector panel offers further support for string modification through its Smart Edit feature. Simply click on a shared attribute of the selected objects, whose value is a string. A button will become available at the far right of the cell. Click on this button to access the Smart Edit dialog.
The Batch Replace tab provides simple straightforward substitution, along the lines of the string substitution discussed previously (but without having to enter the curly braces). Click in the From field and enter the portion of the current string that you wish to replace. Click in the To field and enter the string to be used as the replacement. The familiar string substitution syntax is displayed at the bottom of the tab.
For example, consider the designators of three header components that currently have the prefix P
that needs to be changed HDR
. In this case, select the components, click on the Name attribute in the panel and access the Smart Edit dialog. Then on the Batch Replace tab, enter P
in the From field and HDR
in the To field (the replacement string is therefore {P=HDR})
. After clicking OK, the designators will be modified accordingly.
As with basic string substitution, the Batch Replace tab provides for replacement of multiple, differing string portions in the same target string. Enter the various substitutions as distinct From-To entries. Consider the previous USB Port example (see Batch replacement of string-based attributes), where strings of the form HDRx_2
need to be changed to USB-x_3
. In this case, you would enter two distinct substitution entries on the Batch Replace tab.