如何使用 KiCAD 插件 Python API 获取板上所有封装

使用以下 for 循环遍历当前板上的所有封装:

list_footprints.py
for footprint in list(pcbnew.GetBoard().GetFootprints()):
    # Example of what to do with [footprint]
    print(footprint.GetReference())

Check out similar posts by category: KiCad, Python