BOM Gen by Package & Value on Mac

If you run away as soon as somebody says “Git” or “Python,” this might be for you.

If you use a Mac, like me, you might find the bom2csv tool in Eeschema works but it’s not great. The other option to generate a BOM via PCBnew doesn’t work so well however, generating a disorganised-looking file full of semicolons. But all is not lost …

To generate a BOM with components of the same package and value in the same row, follow this guide. There are many steps but it’s not hard, and it shouldn’t require any software you don’t have already.

1.	Launch KiCad.
2.	Open PCB with PCBnew.
3.	Choose File > Fabrication Outputs > BOM File.
4.	Locate the BOM CSV and open in Numbers.
5.	Use the SUBSTITUTE formula to convert all semicolons to commas. Do this however makes the most sense to you. I added a new sheet and pasted the entire table from the first sheet in it, then replaced all the cells with this formula, referencing the corresponding cell on the first sheet. (SUBSTITUTE(REF,”;”,”,”))
6.	Launch TextEdit. (Order of following operations is important.)
7.	Select all cells in converted table and paste into TextEdit.
8.	Convert to plain text via Format > Make Plain Text.
9.	Save as CSV. (TextEdit doesn’t mind if you save a plain text file as a .csv directly.)
10.	Open this CSV in Numbers.
11.	Click Sort & Filter and filter by column A (ID) to send empty rows to the bottom.
12.	Find the column titles at the bottom of your data (above empty rows) and paste at top of file for your reference.

The end result should look something like this (screen shot below), with every single component of a given value and package tidily summarised in a row, complete with a quantity label. If this helps you, great! If you use Windows, I don’t want to hear about how much better Excel is than Numbers, because yeah, you could have told Excel that a semicolon is a separator and be done with it. Numbers is better at some things but this isn’t one of them.

Enjoy!

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