I wounder if KiCad developer aware that using XML, and XLST for generate BOM going to be issue for large design, and very slow due to it’s architecture, and generate a file one time use file?
I would think in the future, it would be better to have action-plugin that allow users script to directly generate BOM from native file. This can be much faster, and do not required to dump everything into memory.
that thread is 9 years old… do you have any evidence that this will be a problem in practice? I have a hard time believing any reasonable BOM will be an issue for a modern computer.
Kicad does not limit users to xslt. You can for example run python scrips or nodejs. Both have very efficient xml parser libraries. (See my faq article for some examples: How to create a bill of materials (BOM)?)
I would think the current easy to do BOM from KiCad is the xlst dialog windows for BOM gen. I would rather to see the “action plugin” support in eeschamtic so we can run BOM gen from there instead of current XLST. I don’t think we event need to use XLST.
There is no xslt dialog. The bom dialog does not even come pre filled with the xslt scripts. (On a clean install there is no script pre defined.) Read my tutorial. I show how to use one of the python scripts that are shipped with kicad.
I just finish the script for my work. This is another way of doing CSV BOM <==> SCH (both direction):
bom2csv script: Is use to run from eeschma Generate Bill of Material/command line tool, it just all most the same with supplied one, but some special recognized fields in the order I
wanted.
bom2sch script: Run on command line tool, should take any csv output files from supplied eeschema BOM scripts (full or partial) and back annotate back to schematic. I try design this script so it can:
Run on very very large size project without using much of memory other than the whole BOM table.
Update the component’s value at the location where they were in the original schematic files, so diff is very easy compare to using KiField scripts.
$ bom2sch.py
2019-01-18 16:44:34,190 [bom2sch.py:257 ]
bom2sch.py csv_file.csv [root_schematic_file.sch]
root_schematic_file.sch can be automatically extracted from csv file
where "Source:" field specified in the header meta data. This usually
create by eeschema BOM generator scripts
"""myEqu is a more advanced equivalence function for components which is
used by component grouping. Normal operation is to group components based
on their value and footprint.
In this example of a custom equivalency operator we compare the
value, the part name and the footprint.