-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] "Exclude from Bill of Materials" Still Included In the BOM #522
Comments
Hi @dbeckwith01 ! I think I know what the problem is. You are using exclude_from_bom, but not dnp (Do not populate flag). This usually works for KiBoM because KiCad doesn't even list these components when creating the netlist from the GUI, but KiBot uses the command line interface of KiCad which includes them, of course with a flag exclude_from_bom. So KiBoM is only implementing the dnp flag because @SchrodingersGat never saw a netlist file with the exclude_from_bom flag. On the other hand KiBot is generating the XML files with all the components, just reflecting the correct flag, and using KiCad! but not the GUI. The patch for KiBoM is really simple: diff --git a/kibom/component.py b/kibom/component.py
index b005b01..336bf33 100755
--- a/kibom/component.py
+++ b/kibom/component.py
@@ -354,7 +354,8 @@ class Component():
# First, check for the 'dnp' attribute (added in KiCad 7.0)
for child in self.element.getChildren():
if child.name == 'property':
- if child.attributes.get('name', '').lower() == 'dnp':
+ name = child.attributes.get('name', '').lower()
+ if name == 'dnp' or name == 'exclude_from_bom':
return False
# Check the value field first I'm creating a PR SchrodingersGat/KiBoM#197 |
Updated docker images should be available now. Let me know if you have any problems |
@set-soft Thank you for looking into this, discovering the issue and providing the diff. What's the best way to implement this fix given that I'm using the Docker images. I guess I should wait until KiBoM is updated and then the KiBoT image can be updated. |
Hi @dbeckwith01 ! I updated the docker images. The KiBoM package should be 1.9.1-2, try pulling fresh images and run:
|
Describe the bug
I am using the docker image for KiBoT on a MacBook M2 Pro to automate my fabrication outputs. I have noticed the when the "Exclude from Bill of Materials" is ticked in the schematic file it still shows up in the BOM.
I have posted this issue on KiBOM initial and I was asked to repost here.
To Reproduce
Using docker via
docker run --rm -it -v ./:/src setsoft/kicad_auto:ki7 /bin/bash
Run KiBot with the following command
kibot -c ./src/config.kibot.yaml -e ./src/Test.kicad_sch -b ./src/Test.kicad_pcb
Expected behavior
If "Exclude from Bill of Materials" is ticked, the part is not listed in the BOM.
Environment (please complete the following information):
Where are you running KiBot:
Additional context
Test.zip
The text was updated successfully, but these errors were encountered: