mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 10:43:15 +02:00
18 lines
266 B
Python
Executable File
18 lines
266 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from pcbnew import *
|
|
|
|
pcb = BOARD()
|
|
module = MODULE(pcb)
|
|
module.SetReference("M1")
|
|
|
|
pad = D_PAD(module)
|
|
module.Add(pad)
|
|
|
|
pcb.Add(module)
|
|
pcb.Save("/tmp/my2.brd")
|
|
|
|
print map( lambda x: x.GetReference() , list(pcb.GetModules()))
|
|
|
|
print "Saved?"
|