HTML Interactive BOM adding fields/referencing to CSV/Excel


 I'd like to make 2 changes to an interactive BOM for testing purposes:

 - To add 2 fields and reference them to CSV's, one for expected test measurements and another for actual measurements. 
 - To highlight components where the actual measurement falls outside of any tolerance of the test measurement. 

  Can someone walk me through how to and what to edit in order to achieve this?

I’m not sure what does a “measurement” of a component mean but if I understand from your vague problem statement you want to:

  1. Add two additional numerical fields to the bom table
  2. Highlight components where these two fields differ beyond some tolerance (presumably the tolerance is different per component group)

You can do first thing without modifying code at all, just add your fields in kicad and use them as extra fields in ibom. If you don’t want to add fields in kicad and need to use external csv files then you will have to write custom extra data parser. Look at existing netlist, xml parsers.

To do the second part you will have to change javascript code. I can give you pointers but it’s not a trivial task, if you are not comfortable reading and writing python/javascript you won’t get very far.
For starters read render.js to understand how component drawing loop works and how highlighting works.

There are several ways to create a customized BOM (csv and html) but, only one way (that I know) without messing around with customizing code, javascript or python.

The easiest way is to:
• Double-Click the Symbol and Add desired Fields and Values

(Note: you can Use the ‘Bulk-Edit’ Icon but, that only enables adding the Field-Name and you need to add values as above or in the field directly)

• With your fields/values added, Click the BOM icon and select
“bom_csv_grouped_by_value” (that’s the only one that seems to grab the Values for the added fields)

• That creates a CSV file. Now, Use it in Excel/other’s

Screenshot show I added two fields and dumb data

After Loading into Spreadsheet without making it pretty…

I have several that I created/tweaked that can do it but, except for my HTML one, there’s no real advantage over the stock one cited above shown in Blue, below…

Screen Shot 2023-11-16 at 13.46.46


 I appreciate it and bumping thread in case I get time to alter the CSS and Javascript to do so. Thank you all!

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