BOM generation in "new" Kicad (Windows)

Why open office? Text editor should be enough.

That was just the default program for xml. Looks like everything is in the xml.

http://s000.tinyupload.com/index.php?file_id=03517736531718361445

your xml processed fine on my pc.

try to expand the command line with real file names and run the command from the command line outside of Kicad, to see what messages pop out.

On my windows station the command resolves to:
“c:\Saxon\bin\Transform.exe” -t “d:\temp\1\inLOOP New Pro_Comm Sound Board-.xml” -xsl:“d:\kicad-winbuilder-3.4\kicad\bin\plugins\bom2csv.xsl” -o:“inLOOP New Pro_Comm Sound Board-.csv”

inLOOP New Pro_Comm Sound Board-.csv (3.5 KB)

Thank you for all your help. I finally got it all correct. I appreciate your time. Thanks again.

Thanks Dolganoff for this tip and the detail of your explanation. Got it going first time in BZR5380, constructed using winbuilder. I found the bom2csv.xsl plugin hiding in kicad-winbuilder-3.4\src\kicad\eeschema\plugins.

Cheers! Geoff

1 Like

I tried saxon, but it does not really work well for me, so I took some time ‘installing’ xsltproc.
I made a package with all necessary stuff and uploaded it to this forum, have a look at this post:
BOM grouped by reference

Enjoy!

Hi,
I have tried to download and install saxon but got struck in the middle(there was no .exe file to install saxon).
Can you post a more Straight forward method to generate BOM?
Thanks in Advance.

The exe file is (and always was?) there, I’ve just checked

http://sourceforge.net/projects/saxon/files/Saxon-HE/9.5/

Yeah it was there. Sorry… and it worked thank you so much for your help Dolganoff.

Using Lazarus/Pascal, I developed a simple Windows program to generate BOM (csv file) out of KiCAD netlist. It works for me, but it does not have all the bells a wistles. If anybody interested, I can share the program and add features.

I’ve been working on this too, last week. My intent was to use the Octopart API to fetch component prices. My Qt/QML tool reads a schematic file and does a lot of really nasty regex matching to slice it up into a table (as shown). Multiple schematic files in differing quantities can be added and sorted to a master list (I batch order my project parts to save on shipping).

I just wish there was a universal way to include the manufacturer part number in KiCad, preferably with some kind of parametric selection dialog. That would make fetching parts much much less convoluted. This then would allow one to do live cost price estimations during design, which is a feature I’d really like to have!

Hi Stephan. I thought about it too, but I do not have enough courage to make such a program. It is a nice idea to deal directly with the schematic file. I was thinking about a local database where components in stock are listed.

I guess a starting point might be to propose some standard fields for components. For me the most crucial fields are “manufacturer” and “order”.

Hi Akouz, I completely agree we should have some neutral (JSON?) model/schema for part classification. What should be in the order field you mentioned?

JSON looks OK for me. “Order” is a manufacturer’s ordering code. I hate typing, this is why I use field “brand” instead of more appropriate “manufacturer”.

I put my BOM extractor to GitHub, https://github.com/akouz/KiCadBOM. You need Lazarus to compile it into exe. It produces two BOMs in form of CSV files. One file lists all components separately, another file lists the same components in groups.

1 Like

I am new to KiCAD, i followed the steps provided in this page. I am getting an error as follows.

Saxon-HE 9.5.1.9N from Saxonica
.NET 2.0.50727.5485 on Microsoft Windows NT 6.1.7601 Service Pack 1
URIResolver.resolve href=“file:/D:/Program%20Files/KiCad/bin/scripting/plugins/bom2csv.xsl” base=“null”
Using parser org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
Warning: at xsl:stylesheet on line 35 column 80 of bom2csv.xsl:
Running an XSLT 1 stylesheet with an XSLT 2 processor
Stylesheet compilation time: 2028 milliseconds

Kindly suggest some solutions to rectify this problem and get BOM files

Thanks in advance

Sriniketh Ravindran

I got that “error” too, but check again. Right above that message, mine said “Success” and the CSV file was placed in my project directory. I didn’t see the “Success” message at first.

Anyway, thanks for the info, Dolganoff! It helped a lot.

For version 4.0.2-stable on Windows 7, here is how I used the already-installed xsltproc.exe and bom2csv.xsl: http://www.firstpr.com.au/kicad/#bomw

My command line is:

"C:\Program Files\KiCad\bin\xsltproc.exe" -o "%O.csv" "C:\Program Files\KiCad\bin\scripting\plugins\bom2csv.xsl" "%I"

I am completely new for KiCAD and just downloaded and installed yesterday! For BOM export, the existed menu is good but limited. Therefore I like to work on the original native data as a .net developer. I found the schematic diagram data is in text format instead of common xml file. So, I write a code to generate Bill of Materials (BOM) from .sch file where I can add my own filters inside. it works well even for hierarchy design. But I do hope the file format (schema) keeps unchanged when new version comes.

Did you check the various BOM generators mentioned on here ?

If you installed this yesterday, and already coded and tested a BOM, that is impressive :slight_smile:
What is this BOM generator written in ?

Chance of no changes is zero.
I would expect the SCH format to change to be similar to PCB, but that is easier to parse than SCH.
It would be easy to check for two formats, and support both eventually.

1 Like