example for pcb creation in scripting
This commit is contained in:
parent
96c1a50e00
commit
b54acf607a
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from pcbnew import *
|
||||
import pcbnew
|
||||
|
||||
pcb = BOARD()
|
||||
module = MODULE(pcb)
|
||||
module.SetReference("M1")
|
||||
|
||||
pad = D_PAD(module)
|
||||
module.m_Pads.PushBack(pad)
|
||||
pad.thisown=0
|
||||
|
||||
pcb.Add(module)
|
||||
|
||||
pcb.Save("/tmp/my2.brd")
|
||||
|
||||
|
||||
print map( lambda x: x.GetReference() , list(pcb.GetModules()))
|
||||
|
||||
print "Saved?"
|
Loading…
Reference in New Issue