Last active
September 16, 2018 12:48
-
-
Save NZSmartie/b1a9eb266710f30e0772764bcf37d7e9 to your computer and use it in GitHub Desktop.
Set the Module's reference text to Cmts.User layer if their reference value matches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pcbnew | |
import re | |
board = pcbnew.GetBoard() | |
for item in board.GetModules(): | |
if re.match('D\d+-\d+$',item.GetReference()) is None: | |
continue | |
print "found %s" % item.GetReference() | |
item.Reference().SetLayer(41) | |
pcbnew.Refresh() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment