How to prevent "virtual" components from appearing in BOM?


#1

Ok, thanks to this post we know how to have a component that appears in schematic and BOM, but not in layout.
Now I’d like to know if there is a way to have a component in schematic, layout but not in BOM.
As I understand that would be possible if BOM exporter would take into account module (footprint) attributes (namely “Virtual”). Does anyone know if such BOM generator exists?


#2

Hm… from that linked post, this part will be relevant:

[quote=“Andy_P, post:4, topic:1218”]
For devbisme’s multi-header case (sounds like Arduino shields), perhaps vary the concept slightly. Assume that the thing needs four headers. Create the footprint which includes all headers in the desired position. Create a symbol, maybe call it SHIELD. Don’t create a Part Number field for that symbol. Make sure this symbol has connections for ALL of the constituent headers. Next, create BOM-only symbols for each different physical header. Include valid Part Numbers for each. If your thing has only 16-pin headers, then you need to create only one symbol which gets instantiated four number of times, with refdes BH1, BH2, BH3, BH4 (BOM Header 1, 2, 3, 4).[/quote]

The SHIELD part will be ‘virtual’ in the BOM, as it appears in eeschema (with pins&nets) and in pcbnew (with pads&tracks), but not in the BOM as it misses a part number.
Would that work for your case?

If not you could only add another field to the symbols in the (your custom) library for being virtual.
And once the BOM is exported you’d be ignoring parts that are ‘virtual’.

A script to add/modify fields for all symbols in all libraries in a folder is located here:

I only wrote this script to get the ‘manf#’ field added to my local libraries as I want to use KiCost… but it’s no big deal to also/instead get a field called ‘virtual’ added to the symbols.
Just export the csv file, add the columns you want to it and import it into the libs.


#3

The components in my libraries all have a PN (“part number”) field. To generate proper BOMs, I first export the BOM from EESchema and get the .csv file. I use a Python script to parse that file against a “master parts list” .csv file (generated from a spreadsheet). The script output is a BOM with each part listed, a count of each, reference designators, vendor and vendor part number.

If there is nothing in the PN field an error is flagged, even though that should not happen because I’ve made sure the symbols have that field filled out. (One of the virtues of using personal instead of community libraries.)

I suppose I could modify the python script so that it accepts something like “virtual” in the PN field and not write it to the final BOM.

If you were a guru with the XSLT processor used by EESchema to generate the BOMs, you could add that function to the XSL source.


#4

resurrecting this thread since Im wondering if there are any news regarding this :slight_smile:
I would like to export a BOM and be able to avoid VIA’s amongst other things showing up there.
any good way to avoid this?


#5

you may have a look at


it really full configurable… :smiley: