From bb1c7a08836e0f6d2fc43b95fc6e1c74954224b1 Mon Sep 17 00:00:00 2001 From: ByteBard Date: Mon, 17 Nov 2025 16:44:00 -0500 Subject: [PATCH] Fix BOM export for KiCAD 9.0 - GetFootprintName() API change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- python/commands/export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/commands/export.py b/python/commands/export.py index 4a26104..e0749ed 100644 --- a/python/commands/export.py +++ b/python/commands/export.py @@ -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()) }