Thanks @qu1ck
Do you have an example of this shell script?
Something along the lines of
#!/bin/bash
/path/to/generate_interactive_bom.py --your-flags-here "$@"
Pass file name to it like my_ibom_wrapper.sh /path/to/board.kicad_pcb
and it will automatically pass the flags along with the file to ibom.
OK. Thank you.
I was actually thinking of the script to convert the .ini file in a list of flags for the CLI.
You could write a little program for that but you shouldnât have to unless you have lots of options that are not default. You only have to specify flags that you changed.
Indeed, thanks a lot.
Is it possible to use IBOM (or the data in the html file) to create a placement (CPL) file? I have an IBOM and Iâd like to generate files for JLPCB assembly.
Yes, but with a bunch of caveats. There is layer, position, angle info in the data, look at the format. You could extract it from the html file directly and decompress the pcbdata struct or you can manually copy from browser dev tools (pcbdata variable in global namespace will be already unpacked).
But you need to take care about what you include in your cpl file (most manufacturers want smt footpritns only or at least separate, ibom does not care about smt/smd distinction) what coordinates offset should you use.
And most importantly you need to make sure it was generated from kicad project, not from something else because I can only guarantee that bounding box center and angle is correct in case of kicad, not other tools. Even then, rotation angle of the footprint is not always the same as rotation from the reel that cpl files are expected to have but that is not specific to kicad or ibom.
I thought this was a built in feature, but apparently not.
This script is good. How can I add columns, my version has only basics, and not for instance Manufacturer, Manufacturers code and so on.
I have not read all 387 messages, and I probably wont.
Add your fields in eeschema and update pcb. Then those fields will appear in extra fields list in ibom config window.
I think I said this already, but this script is good. Thank you. Too bad my libraries are messy.
Version 2.10.0 is released and available in the KiCadâs plugin manager and from pypi.
This release contains many general fixes, compatibility fixes for KiCad 9 and a couple new features:
- Padstack support for KiCad 9
- Via support for EasyEDA
- Html setting to highlight rows on mouse click instead of hover
I just try to run the generate_interactive_bom.py
from iBOM 2.10.0 as in Jobsets: Execute Command (iBom?) - #6 by hildogjr but I getting the bellow error on KiCad 9.0.0-rc3-5ca7abf2c1~182~ubuntu24.04.1
version
...
eractiveHtmlBom/ecad/kicad.py", line 4, in <module>
import pcbnew
ModuleNotFoundError: No module named 'pcbnew'
Maybe the pcbnew
was already removed from KiCad distribution? Someone having the same behavior?
It is not removed, old python api is still there.
You probably have some other python on system path and kicad is picking that. Try giving full path to kicadâs own python. Iâm assuming you are on windows here.
It is true! You are right.
pcbnew
package is not visible on system Python but is on Pcbnew console. So it is under some environment.
Tracking my debugging step: on Linux, the launch file (âshortcutâ) have the content like
#!/bin/sh
. /usr/share/kicad-nightly/kicad-nightly.env
/usr/lib/kicad-nightly/bin/kicad "$@"
The `` file
export LD_LIBRARY_PATH=/usr/lib/kicad-nightly/lib/x86_64-linux-gnu/:/usr/lib/kicad-nightly/lib/
export KICAD_PATH=/usr/share/kicad-nightly
And inside ${LD_LIBRARY_PATH}/python3/dist-packages
there are the pcbnew.py
and _pcbnew.so
(compiled) files.
Just checking how to create a âclean commandâ do include such information on âExecute Command Job Settingsâ for Jobsets: Execute Command (iBom?) - #6 by hildogjr.
You probably should create a wrapper shell script to launch python with PYTHON_PATH variable set to .../python3/dist-packages
of the nightly kicad. Use that shell script instead of python in your jobset command.