Commit b54acf60 authored by Miguel Angel Ajo's avatar Miguel Angel Ajo

example for pcb creation in scripting

parent 96c1a50e
#!/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?"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment