BOM generation in "new" Kicad (Windows)

Whether it makes you sane or otherwise, the fact is it would be possible to have a BOM out of sync with your schematic.

The same is true of netlists, you do generate netlists don’t you? Would you like them to be out of sync with your schematic because (sane or not) you didn’t save the schematic first?

No there isn’t, the button is in fact called “Generate” it is in the BOM dialog just as the “Generate” button in the NET dialog.

Below is just for open discussion:

I am working in a engineering software company which helps synchronize the CAD data to ERP data automatically. Some customers would like to have the BOM data from schematic diagram while others prefer getting from PCB. Data in ERP is very important for costing and purchasing, Therefore the compatibility between CAD versions is also critical when the CAD is upgraded. Attached is my intial result from KiCAD while more customized fields will be added. Maybe I have not played KiCAD well yet.

I think it is better if the project can be saved in xml format when the end user hits the Save button (for both SCH and PCB, easier to be parsed even if more functionality is increased). Now you need export xml file manually then do something else which many of my customers do not like.

PartNo Desc Qty RefDes
complex_hierarchy Main 1
CP 10uF 1 C10
CP 10uF 1 C11
7805 78L05 1 U2
ICL7660 ICL7660 1 U1
CP 47uF/63V 1 C9
CONN_2 CONN_2 1 P1
CP 47uF 1 C1
Test 47uF/20V 1 C2
D_Small 1N4007 1 D1
CONN_2 CONN_2 1 P2
R 220K 2 R26,R28
R 47 2 R25,R27
D_Small 1N4148 2 D8,D9
R 5,6K 2 R10,R20
C 150nF 2 C12,C14
R 1K 2 R23,R24
MPSA42 MPAS42 2 Q6,Q2
MPSA92 MPAS92 2 Q7,Q3
D_Small 1N4148 2 D7,D4
MPSA42 MPAS42 2 Q8,Q4
D_Small 1N4148 2 D6,D3
R 470 2 R13,R3
D_Small 1N4148 2 D5,D2
R 220K 2 R14,R4
R 1K 2 R18,R8
R 220K 2 R22,R12
R 1K 2 R19,R9
CONN_2 CONN_2 2 P5,P3
R 22K 2 R16,R6
LM358N LM358N 2 U4,U3
CONN_2 CONN_2 2 P6,P4
C 4.7nF 2 C7,C4
C 820pF 2 C8,C5
R 47 2 R15,R5
R 4,7K 2 R21,R11
MPSA92 MPAS92 2 Q5,Q1
LM358N LM358N 2 U4,U3

PcbNew “knows” about accessories not shown on the schematic eg heatsinks, fixing screws.
These are all essential for the ERP

Yes. PCB can have more components. But SCH can have more properties generally, such as ErpPartNo, Vendor, VendorPartNo.

Manufacturing company generally also has another mechanical CAD (Solidworks, Inventor,…) to handle these accessories together with other mechanical parts…

You are right. Some like to work on PCB.

I looked into more. It will be great if the corresponding SCH properties can be displayed in PCB Footprint Properties interface and Python API can get these data in the Modules as it is so simple to handle it.

import pcbnew
pcb = pcbnew.GetBoard()
for module in pcb.GetModules ():
print (module.GetReference () + " " + module.GetValue ())

I agree this would be useful, but for now PcbNew has limited Fields and export.

Wishlist nice would be something like
sch = pcbnew.GetSch()
I wonder how hard it would be, to have Python access into the SCH data base, and to trawl both ?
Is this on the SCH roadmap ?

Given the present state of kiCad where SCH allows more fields, than PCB, this could require a dual-export, as a work around.

ie PcbNew can export netlists, or reports, and give RefDes Value Footprint,

If that is also read by the BOM manager, it can check for PCB centric BOM-Valid items, and merge those with the SCH info. (eg include heatsinks, hardware, but skip fiducials, test points )

Not forgetting the PCB(s) themselves should also have order codes.

1 Like

Thanks for your responses. That would be a nice roadmap.

Hi akouz!! I had allok to your BOM extractor and It is very interesting but how it works the inventory? From the code I saw that the extractor opens a file calle INENTORY\inventory.ini but that file does not exist. Which is the syntax of the inventory file?
I opened a kicad schemati and I see my bom but what about the inventory? it is a kind of database that I can create so I can have price updated of all components?

Thanks in adance,
Regards,
Corrado

Hi,

I am also getting the error “Command error. Return code 11” while trying to generate BOM on a recent nightly build (2016-12-22 revision d365dc5) on Win7-64 pc.

But when I opened another project created using a 2 months old nightly (i don’t remeber the version info) in the same 2016-12-22 revision d365dc5 the BOM generation is working.

I did’t get a clue what exactly is happening/cause for the error in the current project ( and why the old project is able to generate bom).

can anybody please clarify this. ( am planing to install the Saxon as @Dolganoff suggested)