Working with Pad Via Templates in Altium Designer
Along with Track objects, Pads and Vias are fundamental elements of all circuit board designs. Each Pad and Via can be configured as a custom object during or after placement.
To raise the design reuse and management capabilities for Pads and Vias in PCB designs, Altium Designer also supports: automated Pad and Via template creation; Pad and Via template Libraries; and a number of associated Pad and Via management Panels.
The concept of Pad and Via templates that can be collected in a Library is not unlike that of PCB footprint libraries, although somewhat more basic. The Pad Via Template library does not store actual Pads and Vias, rather it stores pre-configured definitions that are applied to an instance of a Pad or Via as it is placed. Saved Pad Via Template libraries can be loaded and used to place instances of predefined Pads and Vias in any PCB design or PCB footprint.
As mentioned, existing templates can be saved into Pad and Via Template libraries, and new templates created. The templates in these libraries are made available for use through the PCB Pad Via Templates panel. Local templates are also listed in the panel, making the panel the central resource for working with Pad and Via template libraries.
The PCB Pad Via Templates Panel
The PCB Pad Via Templates panel is a specialized panel that lists both the Pad/Via templates stored in the current PCB document (Local), or those available from Pad Via Libraries that have been installed or included within the current design project (Available libraries).
Click the button at the bottom right of the design space then choose PCB Pad Via Templates to open the panel.
The two library concepts presented in the panel can be summarized as:
- Available Pad/Via Template Libraries – loaded or installed Pad Via Libraries (file-based collections of Pad/Via Templates). This region of the panel lists templates contained in the currently selected Pad Via Library.
- Local Pad & Via Library – the collective term for Pad/Via Templates that are used in the current board design, including any that have been sourced or added from a Pad Via Library. This region of the panel lists templates that apply to Pads/Vias in the current board design.
The Local Pad & Via Library
The entries listed in the lower Local Pad & Via Library region of the panel represent the pad/via configurations (templates) used and saved in the current board design. A preview of the selected template is shown at the bottom of the region.
The templates listed here are Pad Via templates saved within the PCB file, and are not contained in a separately defined 'library' as such. A selected template can be reused in the current board as a new Pad or Via instance by dragging it onto the layout, or by selecting Place from the panel's right-click context menu.
Available Pad & Via Template File Libraries
The upper region of the panel, Available Pad/Via template Libraries, is used to work with Pad Via Template file libraries.
A Template can be placed from the selected library into the PCB by dragging from the panel or the right-click context menu. Because the Pad/Via is being placed from an external Template file library, its properties are not available for editing in the PCB, as can be seen in the image of the Properties panel shown below, on the right. To edit the properties of a library-based pad/via its template must be unlinked, more on this in the Unlinking a Template from a Library section.
The drop-down at the top of the panel is used to select which available library is active, in the image below it's the ExampleViaLib.PvLib
. The button is used to open the Available Libraries dialog where Template library files can be added and removed. Available Libraries are discussed below. Use the Filter field to display only templates whose Name starts with that string.
Making Pad Via Template Libraries Available
The term Available Libraries means Pad Via Template libraries whose templates are available for use in the current board design. This includes Template libraries that have been added to the current project, and also Template libraries that have been installed in Altium Designer. Both types can be reviewed and managed in the Available Libraries dialog; click the button at the top of the PCB Pad Via Templates panel to open the dialog.
- The Project tab of the dialog lists all PvLib files included in the project and also has buttons to add or remove libraries from the project.
- The Installed tab lists all Pad Via Template libraries that are currently available in this installation of Altium Designer, and therefore available to all PCB design projects. Note that with an installed library you can control whether it is available for use or not by enabling/disabling the associated Activated option. This saves having to keep removing and re-adding libraries.
Using a Template in the Design
Templates listed in the PCB Pad Via Templates panel can be used in the current board design in the following ways:
- Placed – place a Local or template library Pad Via directly from the panel.
- Selected in the Template dropdown – in the Properties panel when Pads or Vias are selected. Use this approach to change selected Pads or Vias to use a different template.
- As a Rule Constraint – a Pad Via Template can be selected as a Constraint in the Routing Via Style design rule (shown below).
- As a Rule Scope – the following query keywords can be used when scoping a design rule (for example the Testpoint Style design rule):
- IsLinkedToPadViaTemplate(TemplateName : String) : Boolean/Boolean_String (e.g.
IsLinkedToPadViaTemplate('r75_140')
) - PadViaLibraryTemplate : string (e.g.
PadViaLibraryTemplate = 'r75_140'
) - PadViaLinkedToTemplate : Boolean_String (e.g.
PadViaLinkedToTemplate = 'True'
)
- IsLinkedToPadViaTemplate(TemplateName : String) : Boolean/Boolean_String (e.g.
- For Via Stitching/Shielding – select the required Via Template in the Add Stitching to Net dialog or the Add Shielding to Net dialog.
The Pad Via Template and How it is Named
For each unique Pad or Via placed into a board design, a Pad/Via Template is automatically created, named and stored in the board file. The Template stores the base configuration of the Pad/Via, including its size, shape, padstack type, Paste/Solder Mask and Hole information, and so on. The configuration is automatically named in compliance with IPC standards (specifically, the IPC-7251/7351 Padstack naming conventions). Every Pad and Via used in the design references its Template, this can be seen in the Properties panel, as shown below.
The IPC naming system is metric-based, where one unit is equivalent to one hundredth of a millimeter (10-5 meters, 10µm). So for example, the template for a 1.5mm circular pad with a 0.8mm hole is named c150h80
– where c
indicates circular (round) and h
prefixes the hole size. A pad named r155_125
is a rectangular surface mount pad, of size 1.55mm x 1.25mm; and a pad named s160h100
is a square, thru-hole pad, of size 1.6mm, with a 1.0mm hole. Names of custom shape pad templates are prefixed with u
. Further letter/integer combinations are added for specified Paste/Solder Mask properties.
To observe this behavior, inspect the properties of an existing Pad or Via from its associated Properties panel by double-clicking on the object or selecting the object then choosing Properties from the right-click context menu.
Locating a Pad or Via in the PCB Design Space
Each time a uniquely sized Pad or Via is placed into a PCB design using the Place menu or the Active Bar, a new Pad/Via Template is automatically created in the board file. These templates are referred to as <Local>
Templates. For the current PCB, the list of all used Pad and Via Templates can be examined in the PCB panel when it is set to the Pad & Via Templates mode.
The Pad & Via Templates mode provides advanced control of the Pad and Via templates used in the current PCB document. This mode of the panel is divided into three sections:
- Library Name
- Templates
- Pads/Vias
Library Name
This list shows the Pad & Via template instances in the design as a collection of virtual and physical libraries. These filter the templates included in the lower panel section list and are arranged as:
- All – show all Pad and Via templates including those used from Pad & Via Libraries.
- Pads – show all Pads both local and library based.
- Vias – show all Vias both local and library based.
- Local – show all Pads and Via templates applied to the board, but not those added from Pad Via Libraries.
- Pad & Via Libraries – only show Pad and Vias templates that have been applied from the selected Pad Via Library.
Templates
This region provides a list of all Pad/Via templates that are used in the current PCB design. Its columns include the template source Library Name (local or Pad Via Library name) and the number of Pad/Via instances for each template (Count).
Any number of the listed templates can be saved to a separate Pad Via Library. To do so, select multiple templates using standard Shift+Click and Ctrl+Click techniques and click the Save as Library button. The library will be automatically added to the project and can be saved as the desired *.PvLib
file name using File » Save As from the Projects panel. To learn more on creating a Pad Via Template library, refer to the Creating and Editing a Pad Via Template Library page.
The Templates section also allows a Pad Via Library-based template to be placed in the PCB design using the Place button. Select the desired Pad Via Library in the top Library Name section of the panel to enable this capability.
Pads/Vias
This region of the panel is populated with the individual Pad/Via instances of the template selected in the above Templates section.
As each Pad/Via instance is selected, the object is graphically highlighted in the design space, as defined by the panel’s standard highlight, zoom and selection options located at the top of the PCB panel. Selected Pad(s) or Via(s) can then be edited to use a different template in the Properties panel, choose the required template in the Template dropdown.
Each listed instance in this region is accompanied by a Changed indicator box that becomes checked when a linked library source template differs from that used in the local Pad or Via, i.e. when the source Pad Via Library has been updated. The Changed indicator will also become checked if the local Pad/Via has its padstack type changed, for example, a Pad instance is locally changed from Multilayer to Single layer.
In all cases, the local version of the Pad or Via can be updated (or reverted) to the current template in the source Pad Via Library using the PCB Pad Via Templates panel Update button.
Pad Via Template Editing and Management Tasks
This section discusses the various scenarios where you need to edit Pad or Via templates.
Apply a Different Template to Existing Pads/Vias
There will be times when you want to apply a different template to existing Pads or Vias (perhaps you're reducing the number of different Vias used in a design). In this situation, use the Pad & Via Templates mode of the PCB panel to locate and select the Pads/Via you want to change. Selected Pad(s) or Via(s) can then be edited to use a different template in the Properties panel by choosing the required template in the Template dropdown.
Unlinking a Template from a Library
It is not possible to edit the properties of Pads/Vias using a template from a file-based template library, if it was it would mean that the local instance would no longer match the referenced library template. To edit a Pad or Via that references a library template, the template must be unlinked.
Click the button to unlink a template. When you click this button, a copy of that template is made in the local library, and the selected instance(s) of the Pad/Via are referenced to the local template. Note that if the button is greyed out, this indicates that the template is already local.
Adding a Library Template to the Local Library
If required, a library template can be added to the local library. This can be done by right-clicking on the template name and selecting Add to Internal Library from the context menu, or by dragging the template from the panel’s Pad/Via Library region and dropping it in a blank area in the Local Pad & Via Library region.
Unused Pad/Via library templates can be removed from the local library by clicking the Removed Unused Pad/Via button.
This is equivalent to placing a pad/via sourced from a Pad Via Library template then deleting it from the board, registering that template as locally available. To replace a local template, rather than add one to the local list, see Replace a Local Template below.
Update from Pad Via Library
If a template for a Pad/Via has been updated in the library and that template has already been used in a board design, click the Update button in the PCB Pad Via Templates panel to update the Pad/Via template in the design. The update will automatically be reflected in all instances of Pads/Vias that use that template in the board.
When an update is instigated, the Update Pads/Vias on Board dialog opens, listing the details of the detected change(s) that will be applied.
Three update options are offered by the dialog to control the update process:
- Update locked objects – this will force a Pad/Via object’s template to be updated, regardless of its Locked status.
- Update free objects – update only Pad/Via templates that apply to free Pads and Vias.
- Update component objects – update only Pad/Via templates that apply to the Pads and Vias used in components.
This synchronization behavior is established by the Library property of pads and vias, as seen in the Properties panel when viewing the properties for a selected pad or via respectively. An indication that differences exist between the local version of the template and the source template is provided in the Changed column of the Pads/Vias region in the Pad & Via Templates mode of the PCB panel.
The bottom region of the dialog lists Pads/Vias to be updated. Information about each is listed including Type, Description, Library, Template, and Action. Additionally, you can select to mark each Pad/Via as Locked and/or In Component. When enabled, these options subject the object to controls in the top region of the dialog.
Replace a Local Template
A library-based Pad/Via template can also replace a Local template, which will update the Pads or Vias on the board that uses that local template.
To do this, drag the desired library template from the Pad/Via Library region of the panel to the Local Pad & Via Library region of the panel, but in this case, drop the library template on top of the existing local template entry. All instances of free or component pads/vias that use the template will be updated to the new library template style.
In the animation below, note that C1
and C2
component Pads physically change to the type determined by the 'dropped' library template – from r110_100
to s120
.
Remove Unused Pad/Via
Since template names listed in the Local Library are derived from Pads and Vias in the current PCB layout, if all instances of a particular Local pad/via configuration have been deleted from the board, its corresponding template will be removed from the Local List.
However, if a placed Pad or Via has been sourced from a Pad Via Library, its template will be retained in the Local list when all instances of that pad/via have been removed from the board. Instances of Pad Via Library templates that are no longer required can be removed from the local ‘database’ record with the Remove Unused Pad/Via button. The Update Templates from Library dialog will open from which you can choose which pad and via templates are removed from the local Pad & Via Library. Use the Templates button or the right-click menu to select/deselect all templates in the list or invert the selection.