Interactive BOM - With GUI: Gathering User Ideas

I created BOM python code that does what I need and now I’m geeking…

Decided to implement a GUI for it that runs in the same manner as the default BOM’s but, features CheckBoxes for selecting items/etc/format to include in the BOM.

With that in mind, I thought it useful to Ask for input - ideas for including item’s in the BOM and perhaps doing something with them (such as; Calculating Total Part’s Cost, Including Photo’s exported from the 3D-Viewer…etc…) - stuff and layout generally useful for Users… I’m open to other idea’s and will poke at it over these winter months…

Screenshot shows current working GUI…

1 Like

It really depends on what you want to support and how far you want to go but in theory the sky is the limit for what a bom script can do as it is just a python script having access to all things python can do (including but not limited to reading all sorts of file types, interacting with online APIs, executing other programs etc.). The challenge at some point is more to keep the usability high for all different user groups (hobby, semi- and full professional)

As an idea what you could do: I created a BOM script for my workplace which needs no GUI because it is predefined what and what not needs to be in a BOM. There are some user queries related to additional functions but the basic BOM generation is done completely automatically. I also added there an integration with kicost to be able to pull the latest pricing information if needed. Additionally I implemented an interface with the API of our internal inventory system for various cross-checks, data synchronization and database management to automate various tedious task an engineer otherwise would have to do manually for each new BOM.

Thanks for the input!

I got a bit ‘Long-Winded’ but, My un-stated goal(s) are to:
• Keep it minimal but, useful for user’s not needing many customization’s or a need for my fixing things that user’s mess up.

Heck, as good a Kicad is, we see enough bugs and ‘String’ changes such as KICAD6 to KICAD7. Sure, if user has default setup/files/paths, generally, no problem. But, if custom folders/names/paths/etc… problems…

• Make it simple to use, Example: the stock ‘bom_csv_grouped_extra’ requires user’s add their custom fields to the end of command line.
Those added fields remain in cmd line until user changes them. That works well but, may be a PITA or, not be obvious to all user’s so, I include Checkboxes to make it obvious and easy. Thus, I’d like to get ‘field’ ideas to include in the GUI… Perhaps ‘Checked/Un-Checked’ by default?

I’m not a big fan of ‘One App Does All’, Synchronization, Atomation, AI… Naturally, what a company/business needs isn’t standard so, not on my list.

However, a Checkbox to create a DataBase can be useful. But, that too can lead to a can of worms - I like SQLlite and Libre’s Base. But, it most likely would not suit others… (and I already created a plugin for DB’s that I’m happy with it). DB’s of various types differ in enough to not be standard for all.
User’s will be able to Check the Box for CSV and use the exported file for a DB.

Image’s: Two of them, exported from the 3D-Viewer’s tool or, loading PDF’s. Perhaps more Image’s ? What size and/or resizable?

FileName’s: Could include those in the Kicad project’s folder and/or prompt user for them…
Sorting of fields?
Formatted HTML output?
Alternative Vendor field?

Hey @BlackCoffee: Glad to hear you are working on something like this. Everyone will, of course, have a different bom need – I could see how some sort of named configs could be created/tweaked/saved to suit and a flexible tool to make that easy would be great, imho.

Must admit I have not spent much time digging into generating a custom bom, and I just output a bom using linux-kibom to get something like this:

It grabs all the field names from my database and dumps them. Then I tweak it to something like this:

Costs are an optional thing, and lead to another tool for updating costs via vendor apis.

fwiw

1 Like

@teletypeguy Thanks!

I’ve been using Kicad’s 'bom_csv_grouped_extra’ and adding the Extra Fields at the end of the CMD line, that, along with Libre and a custom Libre Macro are perfect - Two-Click’s and the CSV get’s loaded and formatted.

The only downside is needing to change/add the Fields on a project-per-project basis and not having a pretty GUI with selectable fields. That’s why I’m doing this and it seems useful (to me)…

My code code for CSV is working well and I’m now adding the HTML output and thinking about other Buttons for clicking… I’ll eliminate the pop-up panels (they’re for debugging)…

That looks really interesting. How do you define the order of the columns in the output? CSV is plenty for my needs, and I would print a pdf from libre/excel after defining print range. Not sure if I would have a need for html (maybe to merge with doxygen pages for product documentation).

BOMs_Away – funny! You da BOM.

Please note there is a new GUI BOM exporter in the v8 development nightlies that you might also try to see if it meets your needs.

1 Like

• Though, only to make it convenient, I created a Symbol (called ‘NULL’) it contains Several Fields I might want.
• I also created a Project-Template that shows up in Kicad’s, “File>New Project From Template” and it’s Schematic contains the NULL Symbol.
Thus, all New project’s will contain all the Fields.
• After adding other Symbols, I can populate the desired fields then, delete NULL - this will remove the undesired fields.
• Can click 'Bulk-Edit-Fields Icon to add/edit/delete as further desired.

• At that point, in the same Bulk-Edit panel, User can Export CSV.
But, I’m using my BOM’s_Away so, the CSV output from it, is the one I use.

Answering your question:
Either way, the CSV is created; Double-Clicking the CSV file in Kicad’s panel opens Libre’s CSV import panel where user can Hide columns.

I did column hiding and formatting when creating the Libre Macro.

The only unattended aspect is needing to delete empty columns - that, too can be done in the Macro but, I haven’t yet bothered refining the Macro.

When done, I’ll tweak the Macro to eliminate the Macro selection popup…

ADDED: Screenshot of a more ‘permanent’ way of excluding DNP and datasheet column

In Libre’s CSV importer:

Added

Neither am I but, for Fun, I created one….

A Bom tool is important when creating the PCB manufacturing files. But I think a large problem is KiCad’s own libraries. They have field names like field4 and so on, with them you have to pick a correct field for every component. I mean that I have to build my own libraries with usable fields like “Name”, “Manufacturer”, Manufacturer’s type" and so on. With those the Bom tool has an easy job to make the BOM file.

I began to think about this and got two ideas, bad or good who knows.

  1. Update the component library data from BOM. Too many times I have had to edit the BOM info my self. If some changes could be transferred to back part library, there would less need to edit the BOM. Good libraries would make this less important.
  2. Have you a preview of the BOM. In my former CAD there was a preview. From that preview, it was possible to copy paste data into “open Excel”. And so I got an Excel BOM file.

My posting related to BOM’s was in response to other posts.
For my own needs, I don’t need GUI/custom-code/etc. The built-in CSV tool (Clickable-Button) is all I need plus Libre (and a custom symbol).

To make it less work for myself, I created a ‘NULL’ Symbol that contains Cost, Vendor-Name and Vendor-Part-Number. Further, I created a Template and added the NULL Symbol to it’s Schematic. That eliminates my needing to add the Cost/Vender fields to other symbols. They appear for all the Symbols in the Schematic.

And, considering that most users won’t have interest/skill/etc to do any coding or want to mess with more than a Minimal amount of work, Here’s the simplest approach to getting a consistent good BOM from the Schematic. This is how I do it. Naturally, a user can add/change fields… In fact, I seldom use the Vendor_P/N field.

Video demo’s this - only hand-tweak needed is to set the Calc to use the correct column. I leave the Macro pointing to a column not included because I’m too lazy to reset it…
Once adding other Symbols to schematic, I no longer need the NULL symbol thus, delete it.

NULL_Symbol and Bulk-Edit-Field-Table

That Csv is what Excels eat.
I did not understand all you wrote. Can you choose symbol fields you take into the BOM. KiCad’s libraries have several names, and some of them not very useful. And if you edit the BOM fields and library fields you’ll do same work twice.

I’m not clear on what you’re saying.

I don’t need to Edit any Symbol fields if they don’t need editing. If I don’t want a field, I Uncheck it so it won’t get into the exported csv.

If I want a new field that is not included in a symbol, then I can Add a field in the Bulk-Editor.

If I want to avoid having to Add fields to every project or to a symbol, then I place my ‘NULL’ symbol in the schematic. The NULL symbol has the Added fields I want (Cost and Vendor, Vendor_PN). Thus, will be present/available to enter Values as desired.
once done, I can delete the NULL symbol and fields remain for all remaining symbols.

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