From a12d428ec0628b8c5cf0ce4f862024f703504cec Mon Sep 17 00:00:00 2001 From: Manfred Steiner Date: Mon, 1 Jul 2024 09:20:57 +0200 Subject: [PATCH] Issue #490, 'Do not place' attribute ignored when creating BOM file --- fabrication.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fabrication.py b/fabrication.py index 062475b..ba27370 100644 --- a/fabrication.py +++ b/fabrication.py @@ -309,6 +309,13 @@ def generate_bom(self): writer = csv.writer(csvfile, delimiter=",") writer.writerow(["Comment", "Designator", "Footprint", "LCSC"]) for part in self.parent.store.read_bom_parts(): + components = part[1].split(",") + for component in components: + for fp in self.board.Footprints(): + if fp.GetReference() == component and fp.IsDNP(): + components.remove(component) + part[1] = ','.join(components) + self.logger.info("Component %s has 'Do not placed' enabled: removing from BOM", component) if not add_without_lcsc and not part[3]: continue writer.writerow(part)