Interactive Html Bom Plugin for KiCad

Please share the project files (pcb, schematic, netlist) to help me debug this.
Also it appears that you are same person that filed #89 on github so why not file this one too?

封装制作测试工程.zip (38.7 KB)

Thank you for your hard work.
Yes, # 89, that’s me.
I uploaded my test project. Both the component footprint name and the field name are expressed in Chinese.
This problem has only recently been discovered. I am building my own component library to link PCB SMT manufacturers in China. So I need to use this Chinese field, of course, also I can use English, But that’s not my mother tongue., the expression is not very clear, some components do not know how to express in English.

Thanks, I just pushed a fix. Let me know if it works, it does for me.

Yes, it works well now. thanks.

Version 2.1 is released

New stuff:

  • Shiny new icon (thanks @hildogjr for ideas)
  • Python3 support
  • Fabrication layer support
  • Option to hide pads
  • Touchscreen pinch/zoom and pan support (thanks to github user JJJollyjim, don’t know if they are on this forum)
  • Custom output name format with substitutions
  • Option to blacklist components with empty value
  • Smart sort for value column

Also bunch of bug fixes. Try it out and have fun!
Unless you are using git checkout it’s best to delete previous version before installing this one (you can transfer config.ini file).

2 Likes

3 posts were merged into an existing topic: BOM from Eschema

I know this is probably blasphemy on this forum but EasyEDA support was implemented. If anyone here uses EasyEDA feel free to test.

Also I made it fairly easy to add other ecad software support. Just implement an EcadParser according to the data format.

1 Like

Where is the thumbs down button in this forum!? :stuck_out_tongue_winking_eye:

Blasphemy or not, KiCad allow us to be a laboratory for new IT technologies. Also KiCost, at the past, made me develop some BOM XML Altium and CSV compatibility. The intention was made less hard the user migration and re-use old design.
But of course, the full compatibility / integration of this tools will be reach just in KiCad.

image

1 Like

4 posts were split to a new topic: Trouble with pos file

Plugin now can show some stats about the board and progress of ticking off checkboxes

img

5 Likes

Nice statistics add-on. But what are Groups? Are those collections of same value component (like all 100k resistors on a side is one group, all 0.1uF caps on one side another group, etc)?

Yes, component groups, i.e. rows in bom table.


V2.2 is released
New in this release:

  • Board stats, checkbox progress bars
  • Option to show DNP components in outline mode
  • Datasheet field can be used as extra field
  • EasyEDA support
  • Option to normalize extra field name case
  • Options to hide references and values

And some bug fixes.

2 Likes

Nice tool I started using it recently and I’m suprised of the quality of this work. While with most of the boards I designed it works correctly with some of them I got an error on startup and no results:

I’m running the last version of the plugin on KiCAD 5.1.4 on Windows 10 Pro 64bit.

This’s the error message copied from the dialog box:

---------------------------
Exception on python action plugin code
---------------------------
Traceback (most recent call last):

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad.py", line 438, in Run
    ibom.run_with_dialog(parser, config, logger)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/core/ibom.py", line 315, in run_with_dialog
    dlg.set_extra_data_path(extra_data_file)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/dialog/settings_dialog.py", line 37, in set_extra_data_path
    self.panel.extra.OnNetlistFileChanged(None)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/dialog/settings_dialog.py", line 201, in OnNetlistFileChanged
    netlist_file, self.normalizeCaseCheckbox.Value)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad_extra/__init__.py", line 20, in parse_schematic_data
    return parser.parse(normalize_case)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad_extra/parser_base.py", line 22, in parse
    data = self.get_extra_field_data()

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad_extra/xmlparser.py", line 16, in get_extra_field_data
    xml = minidom.parse(self.file_name)

  File "C:\Program Files\KiCad\lib\python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)

  File "C:\Program Files\KiCad\lib\python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)

  File "C:\Program Files\KiCad\lib\python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)

ExpatError: not well-formed (invalid token): line 1, column 207


---------------------------
OK   
---------------------------

In attach the board file:
V1-10A124.zip (80.3 KB)

Issue is not with the board file, looks like there is an xml file in project directory that the plugin assumes to be extra field data file but it doesn’t have expected format. Try renaming or moving that file or just generate new netlist file, that should solve the issue.

thnx is probably the file produced by KiCAD to be passed to another BOM tool.

Xml file produced by kicad (eeschema to be exact) is exactly the one that is expected so if that is indeed the case then it’s likely a KiCad bug. Please check that there are no other xml files.
If you can post xml file here it will also help.

Maybe they were produced with a former kiCAD release and this caused the problem. After removing them everything worked fine. I launched again EEschema BOM extraction (creating another XML file) but this haven’t triggered any error within your script.

If you can post xml file here it will also help.

Unluckly I deleted nasty XML files …

I see, thanks for the update. I’m going to fix the error anyway, the plugin shouldn’t just die with a stacktrace for invalid xml. But at least this is not a blocking issue.

1 Like