Skip to content

Commit e82e1eb

Browse files
committed
Add BOM and DNP exclusions
Add ability to exclude FP from BOM using "Exclude from Bill of Materials" checkbox FP attribute. Add ability to DNP a FP by checking "Do not Populate" checkbox FP attribute.
1 parent 5df22f7 commit e82e1eb

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)