I am not able to get an action plug-in to appear in the PCBNEW menu. I have run the following to determine the path:
import pcbnew
print(pcbnew.PLUGIN_DIRECTORIES_SEARCH)
# with the following output:
/usr/share/kicad/scripting
/usr/share/kicad/scripting/plugins
/home/andrew/.config/kicad/6.0/scripting
/home/andrew/.config/kicad/6.0/scripting/plugins
/home/andrew/.local/share/kicad/6.0/scripting
/home/andrew/.local/share/kicad/6.0/scripting/plugins
/home/andrew/.local/share/kicad/6.0/3rdparty/plugins
On my system, the existing directory is /home/andrew/.local/share/kicad/6.0/scripting/plugins. I placed my plugin, tracks.py into this directory.
After Tools->External Plugins->Refresh Plugins, I do not see my plugin in the menu. The contents of tracks.py are as follows:
from pcbnew import *
class SimplePlugin(ActionPlugin):
def defaults(self):
self.name = "Thick VCC Tracks"
self.category = "Track adjustments"
self.description = "Script to change the width of track named 'VCC' in a net"
def Run(self):
board = GetBoard()
for track in board.GetTracks():
if track.GetNetname() == "VCC":
track.SetWidth(FromMM(1))
SimplePlugin().register()
Any advice on what to try next?