From 48bcd79d9c0a9a56fef2fc357cebf0c282824b48 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 5 May 2023 17:31:43 +1000 Subject: [PATCH] Check for 'dnp' attribute introduced in kicad v7 --- kibom/component.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kibom/component.py b/kibom/component.py index b967b1f..68272b7 100755 --- a/kibom/component.py +++ b/kibom/component.py @@ -351,6 +351,12 @@ def getRef(self): def isFitted(self): """ Determine if a component is FITTED or not """ + # 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': + return False + # Check the value field first if self.getValue().lower() in DNF: return False