Seeed Studio BOM generation plugin


#1

Recently I was manufacturing some boards with Seeed Studio’s FusionPCB service, and that has a specific (albeit simple) BOM template requirement, something like:

Part/Designator,Manufacturer Part Number/Seeed SKU,Quantity
C1,RHA,1
"D1,D2",CC0603KRX7R9BB102,2

I haven’t seen any plugin that generates this format by default, and I wanted to play with / contribute to KiCad a bit, I’ve put together a simple plugin. Seeed released their Open Parts Library (OPL) for KiCad too, relatively recently, and thought to take advantage of that as well. Thus came up with the convention:

  • OPL parts have a SKU value defined, that’s the default value to export
  • If there’s no SKU, then a MPN field is searched and exported
  • If neither is found for a part, nothing is exported for that, and at the end of the export a warning is issued.

Thus for every part either set a SKU with the OPL part number or an MPN value.

You can find the plugin on Github at:

Just clone it somewhere on your hard drive, and add it in eeschema with a name. It works with both Python 2 and 3, and should only use standard libraries:

Any feedback is appreciated as well!


#2

Hi,

Great job creating this.

I have found a small bug when running this on windows. It will add and extra LF on the end of each line.

I have changed the line to open the output file as binary to stop this behaviour.

“with open(”{}.csv".format(output_file_slug), ‘wb’) as csvfile:"

Not sure what effect this will have on Linux though.

Thanks Mike