From 547d59370a4368496fd1c020529bde93244194f6 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 30 Nov 2023 07:51:49 -0300 Subject: [PATCH] Exclude components marked as "Exclude from BoM" 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! --- kibom/component.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kibom/component.py b/kibom/component.py index da9cc18..5afec29 100755 --- a/kibom/component.py +++ b/kibom/component.py @@ -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