Execute scripts

Hey there,

I’m newbie at scripting and i was wondering if there was another way to execute scripts on Pcbnew.
For the moment, I use the command execfile(“path”) to test several little scripts. But, in the futur, I’ll need to
execute them “automatically” without going in the pcbnew’s console. Is there a way ? Am I doing it wrong ?

Thanks in advance !

Nightly has Action Script, but in 4.0.x you’ll need to open Scripting Console and type import pythonfilename

Here are some basics:
(The folder is the same, but only nightly has the menu item).

Place the layerviewset.py and layerviewset_gui.py files in C:\Program Files\KiCad\share\kicad\scripting\plugins Or the equivalent in MacOS or Linux (there may be a user-level directory for such files, but I am not aware of it at the moment.)

Within KiCad pcbnew, select the Tools > External Plugins > Refresh Plugins

1 Like