BOM Generation: Scattered column disalignment

The default BOM generation script output scatters data into various unaffiliated columns.

In the schematic, not all parts have the same properties and for some parts, the value of the property is left blank.

• Is the default generation script not intended for actual use?
• Is there a standard or popular third-party script which doesn’t choke on parts with non-identical property lists?

https://github.com/JitterCompany/Kicad_bom_sync

After updating to Kicad 7, I was having various issues with the BOM scripts, too. And I’m always hesitant to rely on 3rd party plugins because I never know how long they’ll be supported, etc. I’m not against it, I just usually try to see if I can get by without it first.

Ultimately, I ended up modifying the following script:

  • /usr/share/kicad/plugins/bom_csv_grouped_by_value.py

At first it was giving problems like those described earlier in this thread (e.g. certain column headings did not match the actual data).

I found an error in line 147 that was causing the data in these columns to be offset by 1 column from the proper heading. Once I made the change shown below, I was able to get the BOM output I needed. Thankfully it was an easy find/fix, as I’m pretty inexperienced with Python.

I do wish the BOM scripts were easier to work with. It would be nice if you could easily select which columns to include & re-order them. I’m sure that’s what the intent was - and an intermediate Python programmer can probably handle it just fine. But a newbie like me can only go so far.

Anyway, hope this helps.

2 Likes

Can you open a bug report on gitlab (or better, a merge request)?

Done.

I didn’t know how to do a merge request so I just submitted it as an issue.

3 Likes

great bug report, thank you for that.

I opened a merge request with a fix based on yours and tagged you in the commit message.

Edit: Merged, so the fix will be in nightlies and a future 7.0.x version, probably 7.0.1.

2 Likes

Awesome. Thanks for doing that.

-svk

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.