sch-rnd-aux knowledge pool

 

BoM export from sch-rnd or pcb-rnd

export_bom by Tibor 'Igor2' Palinkas on 2023-07-02

Tags: howto, bom, export, pcb-rnd

node source

 

 

Abstract: Exporting Bill of Materials is possible both from sch-rnd and pcb-rnd. This pool node compares the two.

 

export_bom

The plugin exports a similar BoM list that pcb-rnd's export_bom does. It uses the very same template engine. You can configure your own templates to alter the output file format, which doesn't even need to be one-line-per-device.

Documentation is available in the user manual

The default template uses a format similar to pcb-rnd's, with a shorter header. Most notably I did not add the current date in the header: any modern file system can keep track of file creation date.

export_bom in pcb-rnd vs. sch-rnd

A valid question is why (or when) you would use export_bom in sch-rnd or export_bom in pcb-rnd. Here are a few pointers:

1. if you have schematics but no layout, e.g. you are workign for breadboard, or working with a subcontractor for the layout who doesn't use pcb-rnd, you may want to use sch-rnd's

2. likewise if you are working with pcb-rnd only, without netlist, or netlist specified from within pcb-rnd, or manually written netlist, or netlist imported from an alien netlist format (e.g. subcontractor not using sch-rnd for the schematics), you may want to use pcb-rnd's

3. DNP: this feature is to be announced; but generally the DNP status of components should work the same in sch-rnd and pcb-rnd so that alone shouldn't affect the choice

4. attributes are not transferred to pcb-rnd; this was a historical problem with geda, but I've fixed this in sch-rnd recently (this feature is to be announced). So this shouldn't affect the choice either, you can configure the workflow to copy arbitrary attributes from sch-rnd to pcb-rnd through the tEDAx netlist.

5. corner case: some users, like me, prefer to have some of the parts only on the PCB, not on the schematics. Typical examples are zero-ohm resistor placed purely for routing reasons (as "jumper wires", typical on 1 or 2 layer boards) or mounting screws that I feel are not belonging to the logics department (the schematics). In such cases the bom exported from pcb-rnd is richer.

6. there are stances (circuit variants or build options; this feature is to be announced) now, which means you can have a schematics that specifies multiple options. In some cases this would be multiple different boards. If you export from pcb-rnd, next to your gerbers, you surely get the BoM matching your board. If you export BoM from sch-rnd, and you are using the same stance that you used for exporting the netlist for the layout, you will get the same output. But there's room for mistake, using the wrong stance for a given board.

So all in all, if you are doing a BoM for populating a board and your board is drawn in pcb-rnd, I recommend exporting from pcb-rnd, because there are corner cases (5. and 6. above) where this can make a big difference, while in normal cases it's all the same.