Rename GetModules to GetFootprints

This commit is contained in:
Dominik Wernberger
2020-11-14 09:37:45 +00:00
committed by Werni
parent dfddd19b17
commit a4650e7269
10 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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("")