Purchasing Libraries

Hi, KiCad Newbie here.

I have a fair understanding of Footprint, Symbol and Symbol Libraries now but I am wondering how users are storing their “Purchasing Data”. With only one schematic symbol (a resistor for example) and one footprint (0603 for example) there are a LOT of possible part values. And each part value can come from multiple vendors with multiple Vendor PNs (cut tape vs reel for example) and various costs at different quantities.

I started out with Parts & Vendors a long time ago, rolled my own solutions, but I am curious how other KiCad users address these issues.

Any suggestions?

Thanks,
Bob K.

I rolled my own and used MySQL and pyODBC … The GUI written in Python and wxWidgets.
P&V was great !

Obviously the KiCad libraries are only a starting point. You might like to browse previous forum topics on the use of the database integration feature that arrived in v7 for solutions others have adapted. Unfortunately as yet there is no Database category on this forum so you might have to do some searching with suitable terms.

In case you have yet to stumble over that forum feature: top of every page near your avatar is a grey magnifying glass. Click on that.
In your database case; ignore any pre 2023 posts because databases only arrived with Kicad 7.

Hello @rkondner and welcome to KiCad!
Personally, I often rely on plugins, and a familiar colleague assists me using Python to enhance data management capabilities according to my requests.

Hi,

Since KiCad 7: PostgreSQL with Manufacturer, Manufacturer Ref., Supplier, Supplier Ref. fields. I also have a field with the price to have an approximative components costs when generating the BOM.

I have organised my way when KiCad was V4 so don’t use yet KiCads new features.
I have a list of all elements I use in LibreOffice spreadsheet (at first tab-page).
From KiCad I generate BOM csv file and paste it into second page of this spreadsheet (not from column A but more to the right). Then in beginning columns I have the equations that simply copy reference lists, value, footprint form the columns on the right. And in next columns I have equations that based on value and footprint select a cell from first page. That way you can copy here as many columns from first page as you wish.
Then I copy a set of columns on the left and paste special (only texts) to another spreadsheet that is my BOM containing all what I need.

Piotr,
Thank you. Do you have a finished spreadsheet or .csv you could send me?

bob at partsync dot com

Thanks,
Bob K.

I will make a reduced spreadsheet and put it here. But not sure if today.
I hope there are no problems with formulas. I have LibreOffice set to Polish version and formulas you can edit letter by letter so I even don’t know what are the English names of key formulas. I hope they are coded internally in the way not depending on language :slight_smile:

There are a few ways to accomplish what’s wanted… including setting up a default Template…

Another simple way is to create Symbol that contains all the Fields you want.

Several ways to deal with this. To make it easier on myself for use in existing projects, I open thier Schematic and place my NULL symbol in the schematic. That creates the Fields and they are available to all the other Symbols in the schematic.

After filling in the Field content’s, I can delete the NULL symbol and the Fields/Contents remain.

This is an un-polished video demostrating it

The first part generates a CSV from my Plugin. Then, it switches to showing the NULL part/Fields and Re-generating the CSV from the default Tool in the Bulk-Edit panel.

Then, it goes to loading the CSV in Libre and using my Macro to pretty it up and Calculate Total Cost (also deletes the previous CSV generated from the Plugin)

1 Like

So here it is:
BomGen.zip (39.5 KB)

You start with BomGen containing only Elem and Bom sheets. In zipped file you have also Test sheet you get at the end.

In zip there are:

  • Test.zip - Archived KiCad Project (I have just did to bug-report something from other thread),
  • Test.csv - KiCad generated BOM from Test project schematic,
  • BomGen.ods.

How to get BOM from that:

  • In schematic - Tool-Generate BOM… with bom_csv_grouped_by_value_with_fp - you get Test.csv
  • in BomGen:
    • insert new sheet (Test),
    • copy there Bom sheet contents (in Bom click top left corner and Ctrl+C, in Test Ctrl+V)
  • open Test.csv in text editor and Ctrl+C all from “Ref” to file end (screenshot below),
  • in BomGen, sheet Test:
    • at cell H5 press Ctrl+Alt+Shift+V (Edit-Paste special-Paste unformatted text),
    • ensure that separation by Comma is selected and fields in " are formatted as text,
    • press OK button,
    • select A8…F8 fields and extend them down to row 16,
    • select rows 6…16 and Data-Sort with columns F and C.

At the end in rectangle A5…E16 you have sorted BOM. Copy it and Paste special (only texts) in another spreadsheet.
In column D to get footprint name I used fact that all my footprint libraries names are single letter. If not then you have to find spreadsheet function to copy from KiCad footprint (column L) only text after ‘:’ or modify script used by KiCad to generate BOM.

Using both Value and Footprint to identify element allows me to have at schematic both 0402 and 0603 resistors with the same name like 1k.

Remember that it is my solution from KiCad V4. Now probably you can get it easier using KiCad 7 new features.

I use an open source self-hosted ERP program called Dollibar. It allows me to create and inventory my parts, place purchase orders for new parts and receive them into inventory when they arrive, and you can have multiple vendors with different quantity pricing for each for every part number that you create. You can also create work orders, BOMs, and when you complete your work order it removes the componemts from inventoey and puts in the finished product.

https://www.dolibarr.org/ if you’re interested. Its free and open source.

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