Hi,
I created the BOM out of a schematic. Thean I realized that every part is inserted two times.
The reason for this I think is that I added new fields with mouser number and so on to symbol properties.
I also watched some tuturials on youtube. Like KiCad 5.0 - Exporting BOMs from
“Contextual Electronics”. There the plugin shown in the picture was used. But in the latest KiCad Version
it isn’t listed.
Is it really possible that nobody before has realized this? I actual wanted to export mouser numbers and so on automatically, Not deleting every second line.
test.xml (1.8 KB)
Here it is. I made a small test circuit and added to the resistor two fields, test1 and test2.
I used the bom2csv which KiCad has in its default settings.
Now I found a way to import the data. Open Excel -> “Daten abrufen” -> “Aus Datei” -> “Aus Text/CSV” and than choosing the created BOM file which has no ending. Using the .xml file didnt bring sucess for me.
I don’t see any problem with that test.xml, but it is not quite the same as the original. For example, field names with characters -.: in could cause a problem.
OK. Maybe I missunderstood the .xml file. Why is it actual created? When I use the BOM Tool there is a second file whic hasn’t a ending. This one works fine if I impoert it like .csv in Excel.
The BOM system in kicad is a bit of a hack. It first creates a xml file that holds all information of the schematic. This file is then given to the plugin you select. (The plugin really runs as a separate process. It has no access to kicad internal data and gets the xml file as one of its input parameters.)
The output file is created with the file ending you specify. The default command line generated when adding a plugin does not add a file ending. See: How to create a bill of materials (BOM)?
This will be much better sometime in the future when eeschema offers a python API as BOM tools can then use this API to read out data and would not need to rely on an indeterminate file.