Auto Populate Symbol Fields From Digi-Key Part Number?

Hi everyone,

I was wondering if anyone knows of any tools that let you input the Digi-Key part number and then automatically fill out the Manufacturer Part Number, Description, Price, and more in the symbol fields?

Currently I just open up the table view of the symbol fields and copy and paste (this actually very convenient, I’m just lazy).

If not, I’d be interested in making a Python program to do this, but I don’t really know where to start.

Thanks!
-Hunter

1 Like

Digikey has their own Kicad library. Not sure how complete it would be for your purposes.

1 Like

The DigiKey library is here. There are some links in the FAQ about using additional libraries.

1 Like

By finding a way to get the information you want form digikey. The rest is gonna be trivial. I suggest you look at kicost to get an idea. (the old web scraper.) Or find documentation for the digikey api.

1 Like

Ok, thanks for the help!

I am aware of the Digikey library, but I just want to speed up the population of some fields for my components.

Usually the fields I populate manually are the Digikey Part Number, Manufacturer, Manufacturer Part Number, Package, and Verified (something I use to tell my self when a part is complete).

Looking at my .sch file I see that each component looks like this:

$Comp
L Regulator_Linear:L7805 U3
U 1 1 5D012011
P 8200 4000
F 0 “U3” H 8200 4242 50 0000 C CNN
F 1 “L7805” H 8200 4151 50 0000 C CNN
F 2 “lib_fp:TO-220-3_Vertical” H 8225 3850 50 0001 L CIN
F 3 “~” H 8200 3950 50 0001 C CNN
F 4 “497-1443-5-ND” H 8200 4000 50 0001 C CNN “Digikey Part Number”
F 5 “STMicroelectronics” H 8200 4000 50 0001 C CNN “Manufacturer”
F 6 “L7805CV” H 8200 4000 50 0001 C CNN “Manufacturer Part Number”
F 7 “TO-220-3” H 8200 4000 50 0001 C CNN “Package”
F 8 “T” H 8200 4000 50 0001 C CNN “Verified?”
1 8200 4000
1 0 0 -1
$EndComp

Where can I find more info about what each of these fields looks like? Also, will it be safe for me to make a python script that opens the .sch file and adds fields (I’m just wondering if this will break anything else)?

Thanks,
-Hunter

Wait, I think I answered one of my own questions. It looks like the .sch files are documented here: https://en.wikibooks.org/wiki/Kicad/file_formats#Schematic_Files_Format

Last version even convert to the specified currency and have a GUI interface.

You might want to look at kasbah’s PartInfo microservice for getting part field data. You’ll still need to do some programming to get the info into the KiCad symbol library, but you can avoid the pain of (re)implementing the part scraping.

Or my scrappy script - so you can modify the BOM from excel/csv file editor and push it back to schematic:

Copy paste works between kicads symbol field editor and excel. No real need to do this with a script. (Version 5.1.x)

It is true.
However, I have addition logic like mapping filed name that look equivalency (like mfn, manufacture number, part number will understand as the same). And Logic that can identify Part by it’s name so the whichever way the been grouped do not have issue. And it intend to run with minimal amount of memory - So that I can process very large schematic that may not able to keep all in the limited memory of some old computer.

1 Like

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