Skip to content

Commit 554b33f

Browse files
authored
Merge pull request #7 from sparkfun/add-BOM-exclude
Add BOM and DNP exclusions
2 parents 424636e + e82e1eb commit 554b33f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SparkFunKiCadBOMGenerator/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def Run(self):
6969
for footprint in self.unwanted_footprints: # Check for KiBuzzard etc.
7070
if footprint in pack:
7171
unwanted = True
72+
if sourceModule.IsExcludedFromBOM():
73+
unwanted = True
7274
if not unwanted:
7375
ref = sourceModule.Reference().GetText()
7476
val = sourceModule.Value().GetText()
@@ -98,7 +100,7 @@ def Run(self):
98100
if not head_tail[1].isnumeric():
99101
prod_id = ">> INVALID <<"
100102
uniqueRef = name + val + prod_id
101-
if hasProdID:
103+
if hasProdID and not sourceModule.IsDNP():
102104
if "EMPTY" not in prod_id and "INVALID" not in prod_id:
103105
prodIdNum = prod_id.split("-")[1]
104106
while prodIdNum[0] == "0":

0 commit comments

Comments
 (0)