Select multiple pads and bulk edit the properties

Is there a way to select multiple pads and then edit the properties in bulk? ie. export the properties to an editor or a spreadsheet and then reimport?


Simple answer: You can write a script for it.

What is the underlying intention?
Pcbnew has very decent ways to work with footprints. I’m guessing that you may want to make a custom footprint, and then use that footprint for for multiple components. There are also other ways to work with Footprints in bulk in Kicad.

If you give a more elaborate explanation of your intentions, then we have more info to guide you in how things can be done in KiCad.

1 Like

An example that comes to me (without any serious thinking) is to standardize hole sizes for thru-hole parts. By using an assortment of footprints that have accumulated in a personal library you may, for example, end up with various hole sizes of, say, 0.75 mm, 0.80 mm, 30 mils, 31 mils, 32 mils, etc. After careful analysis you might decide that a single hole size - perhaps 31 mils - is acceptable for all of these holes. It would be convenient to select all of the affected footprints and set all of the holes to 31 mils with a simple clickey-clickey-kerchunk!

(Yeah, I know that’s a rather archaic example. Today, most board fabricators will look at that collection of hole sizes and automatically map them into the drill sizes in his “standard tool rack”. Probably without explicitly telling you - though many fabricators have a footnote somewhere on their web pages telling you what the standard hole sizes are, and how they map random hole sizes into their standard tool rack.)


In this instance, I have a module with 22 ground pads underneath that are on a quirky semi-stagger layout.

I’d like to be able to select the pads, export the properties into an editor or spreadsheet, adjust the X/Y coordinates as text and then load the properties back into KiCAD.

Are you talking about one single instance of a footprint on a board which you want to change, or do you want to change the footprint in a library and then update the corresponding footprint(s) on the board(s)?

From Pcbnew:
Hover over your footprint, and press [Ctrl + e] to open your Footprint in the Footprint Editor.
(You can also load any footprint from any library from within the Footprint editor).

Footprint Editor / File / Export Footprint
and save your footprint to disk.
Footprints are written as S-Expressions in a simple readable and parsable file format.

The footprint of a simple DIP 8 IC looks like this in text format:

(module Housings_DIP:DIP-8_W7.62mm_LongPads (layer F.Cu) (tedit 58CC8E33)
  (descr "8-lead dip package, row spacing 7.62 mm (300 mils), LongPads")
  (tags "DIL DIP PDIP 2.54mm 7.62mm 300mil LongPads")
  (fp_text reference U204 (at 3.81 1.27 -225) (layer F.SilkS)
    (effects (font (size 1 1) (thickness 0.15)))
  (fp_text value RS485 (at 3.81 10.01) (layer F.Fab)
    (effects (font (size 1 1) (thickness 0.15)))
  (fp_arc (start 3.81 -1.39) (end 2.81 -1.39) (angle -180) (layer F.SilkS) (width 0.12))
  (fp_line (start 9.1 -1.6) (end -1.5 -1.6) (layer F.CrtYd) (width 0.05))
  (fp_line (start 9.1 9.2) (end 9.1 -1.6) (layer F.CrtYd) (width 0.05))
  (fp_line (start -1.5 9.2) (end 9.1 9.2) (layer F.CrtYd) (width 0.05))
  (fp_line (start -1.5 -1.6) (end -1.5 9.2) (layer F.CrtYd) (width 0.05))
  (fp_line (start 6.18 -1.39) (end 4.81 -1.39) (layer F.SilkS) (width 0.12))
  (fp_line (start 6.18 9.01) (end 6.18 -1.39) (layer F.SilkS) (width 0.12))
  (fp_line (start 1.44 9.01) (end 6.18 9.01) (layer F.SilkS) (width 0.12))
  (fp_line (start 1.44 -1.39) (end 1.44 9.01) (layer F.SilkS) (width 0.12))
  (fp_line (start 2.81 -1.39) (end 1.44 -1.39) (layer F.SilkS) (width 0.12))
  (fp_line (start 0.635 -0.27) (end 1.635 -1.27) (layer F.Fab) (width 0.1))
  (fp_line (start 0.635 8.89) (end 0.635 -0.27) (layer F.Fab) (width 0.1))
  (fp_line (start 6.985 8.89) (end 0.635 8.89) (layer F.Fab) (width 0.1))
  (fp_line (start 6.985 -1.27) (end 6.985 8.89) (layer F.Fab) (width 0.1))
  (fp_line (start 1.635 -1.27) (end 6.985 -1.27) (layer F.Fab) (width 0.1))
  (fp_text user %R (at 3.81 3.81) (layer F.Fab)
    (effects (font (size 1 1) (thickness 0.15)))
  (pad 8 thru_hole oval (at 7.62 0) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 4 thru_hole oval (at 0 7.62) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 7 thru_hole oval (at 7.62 2.54) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 3 thru_hole oval (at 0 5.08) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 6 thru_hole oval (at 7.62 5.08) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 2 thru_hole oval (at 0 2.54) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 5 thru_hole oval (at 7.62 7.62) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (pad 1 thru_hole rect (at 0 0) (size 2.4 1.6) (drill 0.8) (layers *.Cu *.Mask))
  (model ${KISYS3DMOD}/Housings_DIP.3dshapes/DIP-8_W7.62mm_LongPads.wrl
    (at (xyz 0 0 0))
    (scale (xyz 1 1 1))
    (rotate (xyz 0 0 0))

The 8 pads are clearly recognisable.
On the main KiCad website there is also a link to a document that describes the File formats, which are just as open as the rest of KiCad. It’s the good stuff about Open Source Software :slight_smile:

Once you have your modified footprint in a library, you can import it in Pcbnew in as many instances as you need.

An alternative way for you may be to generate your own footprints from a script. Many of the footprints in KiCad are generated by scripts, and those scripts are also on github (gitlab?) to clone, study, modify & execute.

If you want to make your spreadsheet across multiple Footprints at the same time, you can export all footprints used in your PCB into a separate library (Where each footprint will get it’s own file).

A maybe weird, but still entirely valid solution:
Make a single footprint, with the same size as your PCB. You can put as many pads on it and on any location you like. Just make sure that each pad has a different pin number, or Pcbnew will try to connect those pads together (Or give them the same pin number if you Want them to connect).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.