Git Product home page Git Product logo

kicad_bom_export's Introduction

KiCad_BOM_Export

KiCad Add-in Script to export and cost a BOM Written in Python 2.74, as KiCad seems not to support Python 3

This is a simple script process the KiCad intermediate netlist file, and produce a BOM in both CSV and XML Format

###Features:

  • Optionally groups same components into a single row (cmd line paramater "-g")
  • Optionally costs the BOM using FindChips API (cmd line parameters "-f" and "-a [apikey]")
  • Produces both CSV and XML output

###Command Line Parameters -h / help Display Help message -g / group Group like components into a single row -i / input Input file (in KiCad's intermediate XML format) -o / output Output file name (will be appended with .CSV and .XML). If none specified, output file is input file + "_BOM" -f Use the FindChips API -a / apikey The API Key from the online costing service

###Usage from within KiCad:

  • Open EESchema

  • TOOLS menu / Generate Bill of Materials

  • Add a new item with a cmd line similar to: python "[path to python script]KiCadBomExport.py" "-i %I" [other cmd line params]

    eg: python "c:\KiCadBomExport.py" -i "%I" -g -f -a xxxxxxxx Suggest you don't use the standard "%O" output file parameter, or the .xml output will overwrite the intermediate Netlist file.

###Usage with SupplyFrame's FindChips API You need to request an API from SupplyFrame. Go to: http://dev.supplyframe.com/ You will be provided with an API key. Use this in your command line call after the "-a" argument

Within KiCad EESchema, you will need to define a manufacturer part number:

  • within EESchema, Preferences menu / Schematic Editor Options / Template Field Name
  • Add "Mfg_Part_No" to store the manufacturer's part number. Be specific down to package to avoid vague search results

###Using the output files I find that Excel doesn't read the CSV file in well, as it tries to convert data types. I prefer to use Excel to open the XML output file:

  • right-click on XML output file, then "open with Excel"
  • in Excel choose to open as an XML Table
  • Voila!

###Troubleshooting:

  • A log file is created in user home directory (eg. on Windows: C:\User[your username]\Kicad_BOM_Logging.txt)

Further Enhancements Identified:

  • Add command-line option to cost based on number of boards (currently only assumes 1)
  • Use a config file to restrict distributors to a preferred set

Please Contribute! I found this useful, but there is much more that the script can achieve!

kicad_bom_export's People

Contributors

andytallack avatar eflukx avatar obra avatar petteriaimonen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.