This PCB plug-in lets you replace existing footprints in your layout with updated footprints. You can download the source code from the table of attachments below. You can browse the sources here.
Table of Contents
Like some others, I found myself with a routed board and while inspecting the Gerber files decided several of my footprints needed tweaking. All my footprints are generated with Make and Guile scripts, so updating the footprint files themselves was easy. Unfortunately there wasn't an easy way in PCB to update my layout to use my new footprints. (Some discussion of these problems can be found in the email archives here and here.)
This PCB plug-in replaces existing footprints in your layout with updated footprints doing its best to preserve the existing footprint's:
The plug-in adds the UpdateFootprintsFromBuffer
action to PCB. The action takes a footprint (i.e., element) that has been loaded into the buffer and uses it to replace existing footprints (i.e., elements) in the layout.
The action runs in one of two modes: "auto" or "manual".
In "auto" mode, the plug-in uses the buffer footprint description text to find corresponding layout footprints. In my workflow the description text always contains the footprint file name, e.g., "PHOENIX-PT-4-R.fp", so executing the action in "auto" mode will automatically replace all existing instances of the footprint in the layout.
In "manual" mode, the footprint description text is not used and the plug-in will try to replace the selected or named footprints.
Here's the usage:
UpdateFootprintsFromBuffer()
or UpdateFootprintsFromBuffer(auto)
UpdateFootprintsFromBuffer(auto, selected)
UpdateFootprintsFromBuffer(auto)
but only consider selected layout elements.
UpdateFootprintsFromBuffer(auto, named, <name1>[, <name2>...])
UpdateFootprintsFromBuffer(auto)
but only consider elements that match the given element names. For example, UpdateFootprintsFromBuffer(auto, named, U101, U103, U105)
.
UpdateFootprintsFromBuffer(manual)
or UpdateFootprintsFromBuffer(manual, selected)
UpdateFootprintsFromBuffer(manual, named, <name1>[, <name2>...])
Here are the limitations I know of:
Since this is my first trip into PCB's internals, and since the biggest layout I tested it on is a simple two layer board with about 100 footprints, please use this plug-in with care and:
Definitely backup any design before you try out this plug-in!
If you find any problems with this plug-in or have any suggestions, feel free to contact me at dferreyra@igc.org .
To update all my footprints at once, I generated a PCB action script. Here's what a piece of the script looks like:
... LoadFrom(ElementToBuffer, EDAC-RJ45-RA.fp) UpdateFootprintsFromBuffer(auto) LoadFrom(ElementToBuffer, LITEON-LTST-C195GEKT.fp) UpdateFootprintsFromBuffer(auto) LoadFrom(ElementToBuffer, LUMEX-LDD-C402NI.fp) UpdateFootprintsFromBuffer(auto) ...Then I execute the script with the
ExecuteFile()
action. This allows me to update all 100 footprints on my small board automatically and at will.
To build the plug-in:
tar -xzf footprint-update-1.01.tar.gz
Makefile
: PCB_CVS_DIR
to point to the directory containing the PCB source tree.
INSTALL_DIR
to point to the directory where you want the plug-in installed.
make
to build the plug-in. Run make install
to install it.
Note that starting with this PCB commit from 5 Jun 2010, the "Boolean" typedef was replaced by the use of C99's "bool" type. Please download the appropriate version of footprint-update, below. (Thanks to Chris Kilgour for kindly informing me of this and sending me a patch and script!)
-- DeanFerreyra - 30 Apr 2008
Attachment | Size | Date | Comment | |
---|---|---|---|---|
![]() | footprint-update-1.01.tar.gz | 23.6 K | 11 Sep 2008 - 04:57 | Footprint-Update plug-in for PCB (for versions of PCB that use Boolean ) |
![]() | footprint-update-1.02.tar.gz | 23.4 K | 21 Aug 2011 - 23:38 | Footprint-Update plug-in for PCB (for versions of PCB that use bool ) |