Fix BOM export for KiCAD 9.0 - GetFootprintName() API change
Replace FOOTPRINT.GetFootprintName() with str(GetFPID()) for KiCAD 9.0 compatibility. Issue: - KiCAD 9.0 removed FOOTPRINT.GetFootprintName() method - BOM export was failing with AttributeError Fix: - Changed: module.GetFootprintName() → str(module.GetFPID()) - GetFPID() returns the footprint library ID (LIB_ID object) - Converting to string gives "Library:Footprint" format Testing: - Endpoint test: export_bom ✅ PASS - Generates CSV BOM with all 415 components - Footprint names correctly formatted (e.g., "Capacitor_SMD:C_0603_1608Metric") Related KiCAD 9.0 fixes in this repo: - design_rules.py: SetCurrent* → SetCustom* API - export.py: EXCELLON_WRITER → kicad-cli for drill files - view.py: PlotLayer() signature update - component.py: FP_VIRTUAL → FP_BOARD_ONLY Status: All export operations working ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""
|
||||
"""
|
||||
Export command implementations for KiCAD interface
|
||||
"""
|
||||
|
||||
@@ -474,7 +474,7 @@ class ExportCommands:
|
||||
component = {
|
||||
"reference": module.GetReference(),
|
||||
"value": module.GetValue(),
|
||||
"footprint": module.GetFootprintName(),
|
||||
"footprint": str(module.GetFPID()),
|
||||
"layer": self.board.GetLayerName(module.GetLayer())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user