Skip to content

Commit

Permalink
Exclude components marked as "Exclude from BoM"
Browse files Browse the repository at this point in the history
Note that this flag can't be seen on files generated using the GUI and
asking to create a BoM.
But if you ask to export the netlist using the XML format, i.e. using
kicad-cli, you'll get the components listed.
Also note that the same happens with the DNP flag!
  • Loading branch information
set-soft committed Nov 30, 2023
1 parent 519dd24 commit 547d593
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kibom/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ def isFitted(self):
# 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
Expand Down

0 comments on commit 547d593

Please sign in to comment.