I am new to kicad, and I want to create a simple mechanical board with holes… I was thinking about using "Via" to make all my holes.
I have the list of holes with position and diameter I want in my board, and instead of adding all corresponding Via manually I was wondering if there is a way to use a Python script to place all Via for me.
I was looking for a simple kicad python script example on internet with only one via, then I would be able to modify I for all the via I want to add… But I didn’t find such example …
import pcbnew
b = pcbnew.BOARD()
v = pcbnew.VIA(b)
v.SetPosition(pcbnew.wxPoint(30000000, 20000000))
v.SetDrill(1000000)
v.SetWidth(1800000)
b.Add(v)
pcbnew.SaveBoard("board.kicad_pcb", b)