1
0
Fork 0

Scripts: Comment Filed is included in the BOM

This commit is contained in:
linuswck 2023-11-27 11:36:51 +08:00
parent 06a00befeb
commit 2612acc9f7
1 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@
The BOM does not include components with DNP or excluded from BOM field(s) checked. The BOM does not include components with DNP or excluded from BOM field(s) checked.
Grouped By: Value, Footprint, MFR_PN, MFR_ALT Grouped By: Value, Footprint, MFR_PN, MFR_ALT
Sorted By: Ref Sorted By: Ref
Fields: Ref, Value, MFR_PN, MFR_PN_ALT, Qnty, LibPart, Footprint Fields: Ref, Value, MFR_PN, MFR_PN_ALT, Qnty, LibPart, Footprint, Comment
Command line: Command line:
python "pathToFile/generate_bom_from_xml.py" "%I" "%O.csv" python "pathToFile/generate_bom_from_xml.py" "%I" "%O.csv"
@ -41,7 +41,7 @@ out = csv.writer(f, lineterminator='\n', delimiter=',', quotechar='\"', quoting=
out.writerow(['Source:', net.getSource()]) out.writerow(['Source:', net.getSource()])
out.writerow(['Date:', net.getDate()]) out.writerow(['Date:', net.getDate()])
out.writerow(['Tool:', net.getTool()]) out.writerow(['Tool:', net.getTool()])
out.writerow(['Ref', 'Value', 'MFR_PN', 'MFR_PN_ALT', 'Qnty', 'LibPart', 'Footprint']) out.writerow(['Ref', 'Value', 'MFR_PN', 'MFR_PN_ALT', 'Qnty', 'LibPart', 'Footprint', 'Comment'])
grouped = net.groupComponents(components=net.getInterestingComponents(excludeBOM=True, DNP=True)) grouped = net.groupComponents(components=net.getInterestingComponents(excludeBOM=True, DNP=True))
@ -59,4 +59,5 @@ for group in grouped:
c.getField("MFR_PN_ALT"), c.getField("MFR_PN_ALT"),
len(group), len(group),
c.getLibName() + ":" + c.getPartName(), c.getLibName() + ":" + c.getPartName(),
c.getFootprint()]) c.getFootprint(),
c.getField("Comment")])