DRC for BOM?

Is there a way to implement a DRC rule or a script that can check to see if I’ve specified values for custom fields? For example, I have a “MPN” (manufacturer part number) field and a “DigiKey” field (which is a URL to the DigiKey product page for the part). I’d like to automatically check to see which parts on my schematic are missing those fields.

Do you really need a script for that? Just open the symbol field values dialog and enable grouping by MPN field only, you will easily see if there are components without that field specified.

I want to automate it.

Then you can use kicad-cli sch export with either netlist or python-bom format to export all components and fields and write a simple python script to check that.

1 Like

In the next version you can raise errors manually, see: Post-V8 New Features and Development News - #24 by craftyjon