PCB_Pnl-PCBLIBInspectorPCBLIB Inspector_AD

Now reading version 16.1. For the latest, read: PCB_Pnl-PCBLIBInspector((PCBLIB Inspector))_AD for version 17.1
 

The PCBLIB Inspector panel.
The PCBLIB Inspector panel.

Summary

The PCBLIB Inspector panel enables you to interrogate and edit the properties of one or more design objects in the active PCB component footprint (or all component footprints in the active PCB library). 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 with the PCBLIB Filter panel

Panel Access

Access the PCBLIB Inspector panel by:

  • To display the PCBLIB Inspector panel, click the PCB button at the bottom-right of Altium Designer when the PCB Library Editor is active and select the PCBLIB Inspector entry from the pop-up menu.
  • Alternatively, you can access the panel through the main menu by selecting View » Workspace Panels » PCB » PCBLIB Inspector.
Panels can be configured to be floating in the editor space or docked to sides of the screen. If the PCBLIB Inspector panel is currently in a group of docked panels, use the PCBLIB Inspector tab located at the bottom of the panels to bring it to the front.

Defining panel display scope

The PCBLIB 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.

Information will only appear in the PCBLIB Inspector panel when one or more objects have been selected in the design editor window.

Inspecting object attributes

The main regions of the PCBLIB Inspector panel show sections of attributes for objects falling under the defined display scope.

Clicking on a single object in the PCB Library editor window will select that object and display its associated attributes in the PCBLIB 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

You can edit attributes of a selected object, by editing the relevant entry in the panel. The change will take effect once you click outside of the field you are editing. 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 a properties dialog each time.

Another advantage of using the panel for editing is that you can edit multiple objects 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 <...>. Simply edit the attributes as required - the changes made will be conveyed instantly to each object in the selection.

By using filtering, you can apply a query (an expression for the filter) to target a specific group of objects in one or more component footprints in the active library and then use the PCBLIB Inspector panel to edit the attributes for these multiple objects, directly.

With multiple components selected in the workspace, you can drill-down to make changes to Designator or Comment and the changes will be made to all components in the selection. Using the hyperlink entries you can pass back and forth between parent and child objects, without losing the selection.

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.

When multiple objects are selected, changing a common attribute will effect all those selected. For example, to shift a set of selected pads to left or right, edit their common X1 position attribute.

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 PCBLIB 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 PCBLIB 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 Smart Edit dialog offers a streamlined method for performing multiple string modifications,
accessed from the Batch Replace tab.

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.

The  Formula tab provides for more advanced modification, allowing you to apply a specific expression to the selected string objects. The expression can include any built-in arithmetic operators and functions that apply to strings (found in Pascal). Once again, if you wish to use the current value for the attribute as part of the expression, you will need to make reference to this original value, either by using the full name of the attribute, or by using the exclamation character (the supported substitute for the name of the attribute currently being modified). When using attribute names, if any names contain spaces, these must be replaced by the underscore character. So, for example, use of the Component Comment field within a formula should be entered as Component_Comment.

Consider for example three selected memory components specified in a design, with designators U1, U3 and U5. You might want to extend the designators of these components by including some indication of their role. Using the addition operator, you could write an expression to add to the existing string value of the Name attribute. This would take the existing (original) string value and concatenate it with a specified new string, as illustrated below:
Name + '_MEM'

...or, in shortened form:
! + '_MEM'

Note that the spaces are optional. When you press the Enter key the designators of the components will be updated to U1_MEM, U3_MEM and U5_MEM respectively.

To illustrate the use of string-based functions consider the Copy function, which can be used to take a portion of an original string and place it within an expression to create a new string. Take again the Comms Port example (see Batch replacement of string-based attributes), where strings of the form CommPortx_8 need to be changed to IOPortx_32. In this case you could select the four free string objects, access the Smart Edit dialog for the String attribute and write the following expression on the Formula tab:
'IO' + Copy(String,5,6) + '32'

...or, in shortened form:
'IO' + Copy(!,5,6) + '32'

The format of the Copy function is Copy(AttributeName, StartIndex, Length). AttributeName is the full name of the string-based attribute you wish to copy, as it appears in the panel. If it is the attribute currently being modified, the short-form substitute character – ! – can be used. StartIndex is the position within the string at which to start the copy. Length determines how many characters of the string, starting from and including the StartIndex, are to be copied.

As an example, let's consider the Designator of a component is AUX_LED1. In the panel, this attribute is referred to as String. So use of the Copy function might be Copy(String,5,4), the AttributeName is String. The StartIndex of 5 means fifth character in the string from the left, so 'L'. And the Length of 4 means copying four characters starting with that 'L'. The result of the function is therefore LED1.

Tips

  • Pressing the F11 key will toggle the visibility of the panel in the workspace.
  • Information will only appear in the panel when either:
      1) One or more objects have been selected in the design editor window, or;
      2) Object entries are selected in the PCBLIB List panel.
  • With multiple components selected in the workspace, you can drill-down to make changes to Designator or Comment and the changes will be made to all components in the selection. Using the hyperlink entries you can pass back and forth between parent and child objects, without losing the selection.
  • You can use the Tab and Shift+Tab keyboard shortcuts to pass down and up the list of attributes in the panel respectively. Alternatively, the arrow keys can also be used.
  • When applying a filter using the PCBLIB Filter panel, the attributes for the resulting filtered objects will only be displayed in the PCBLIB Inspector panel if the Select option - located in the Objects passing the filter area of the panel - is enabled prior to application of the filter.
If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Note

The features available depend on your Altium product access level. Compare features included in the various levels of Altium Designer Software Subscription and functionality delivered through applications provided by the Altium 365 platform.

If you don’t see a discussed feature in your software, contact Altium Sales to find out more.

Content