Rename GetModules to GetFootprints
This commit is contained in:
committed by
Werni
parent
dfddd19b17
commit
a4650e7269
@@ -41,9 +41,9 @@ pcb.Save("my2.kicad_pcb")
|
||||
|
||||
pcb = LoadBoard("my2.kicad_pcb")
|
||||
|
||||
print(map( lambda x: x.GetReference() , list(pcb.GetModules())))
|
||||
print(map( lambda x: x.GetReference() , list(pcb.GetFootprints())))
|
||||
|
||||
for m in pcb.GetModules():
|
||||
for m in pcb.GetFootprints():
|
||||
for p in m.Pads():
|
||||
print('pad ', p.GetName(), p.GetPosition(), p.GetOffset())
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ filename=sys.argv[1]
|
||||
|
||||
pcb = LoadBoard(filename)
|
||||
|
||||
for module in pcb.GetModules():
|
||||
for module in pcb.GetFootprints():
|
||||
print("* Module: %s" % module.GetReference())
|
||||
module.Value().SetVisible(False) # set Value as Hidden
|
||||
module.Reference().SetVisible(True) # set Reference as Visible
|
||||
|
||||
@@ -49,7 +49,7 @@ for item in pcb.GetDrawings():
|
||||
print("")
|
||||
print("LIST MODULES:")
|
||||
|
||||
for module in pcb.GetModules():
|
||||
for module in pcb.GetFootprints():
|
||||
print("* Module: %s at %s" % (module.GetReference(), ToUnits(module.GetPosition())))
|
||||
|
||||
print("")
|
||||
|
||||
Reference in New Issue
Block a user