GetModules() not supported?

Hello, I’m using kiCAD 7.0.8. I tried to use KiPython tool to run a very simple script as below:
from pcbnew import *
board = GetBoard()
modules = board.GetModules()

Then, an error occurred: AttributeError: ‘BOARD’ object has no attribute ‘GetModules’

Does anybody know why?

API changes between kicad versions, GetModules() changed to GetFootprints() since v6.
Use api reference KiCad Pcbnew Python Scripting: pcbnew Namespace Reference
and look at code of existing plugins/scripts for examples.

1 Like

@qu1ck Thank you very much!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.