2012-07-15 20:01:05 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import sys
|
|
|
|
from pcbnew import *
|
|
|
|
|
|
|
|
filename=sys.argv[1]
|
|
|
|
|
|
|
|
pcb = LoadBoard(filename)
|
|
|
|
|
2020-11-13 23:03:36 +00:00
|
|
|
for module in pcb.GetFootprints():
|
2021-04-27 09:55:56 +00:00
|
|
|
if sys.version_info < (3, 0):
|
|
|
|
print("* Module: %s" % module.GetReference().encode())
|
|
|
|
else:
|
|
|
|
print("* Module: %s" % module.GetReference())
|
2013-04-18 21:23:11 +00:00
|
|
|
module.Value().SetVisible(False) # set Value as Hidden
|
|
|
|
module.Reference().SetVisible(True) # set Reference as Visible
|
2017-08-17 15:55:05 +00:00
|
|
|
|
|
|
|
SaveBoard("mod_"+filename, pcb)
|