Getting BOM information(including MPN if provided) using KiCad's pcbnew Python module


I am using pcbnew python module to read various information from the PCB board, similarly, is there is a function/API in pcbnew to generate the BOM file(including MPN if provided) for that particular board?

Maybe a function/API to call the BOM option in the below screenshot, through the Python Script.

The PCB file does not include the information required. You will need to use eeschema to generate the BOM. See How to create a bill of materials (BOM)?

That’s weird. So why is the menu option in PCBnew?

I believe he meant, no MPN or MNF, the extrA fields provided in Eeschema. A BOM from PCBNew is possible, but also just primitive, not what OP seems to seek

One can generate a very limited BOM from pcbnew. However that BOM can only contain refdes, value and footprint name as nothing else is known to KiCad. I suspect it exists for users who work without schematic and have all necessary info in the value field (or have one unique footprint per component meaning the footprint name can be used as an additional field)

Or it was there from the very beginning when pcbnew was a standalone program and nobody questioned if it still makes sense to have this tool.

Interesting. I’ve used that for dozens of projects because I was too lazy to figure out the BOM plugin system and PCBnew BOM “just worked”.

But I do my real BOMs on Octopart and don’t spec passives until I’m ordering, so value/footprint is all I need.

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