How to get all footprints on board using KiCAD plugin Python API

Use the following for loop to iterate all footprints in the current board:

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