Skip to content

Instantly share code, notes, and snippets.

@kinoshita-lab
Created May 4, 2022 05:54
Show Gist options
  • Save kinoshita-lab/784ca05a71e93ce8b33fdb9157121e15 to your computer and use it in GitHub Desktop.
Save kinoshita-lab/784ca05a71e93ce8b33fdb9157121e15 to your computer and use it in GitHub Desktop.
change visibility of each components' reference for KiCad 6.0
# run this script on KiPython, the terminal embedded in PCB Editor
import pcbnew
visibility = False # change here to the visibility that you want to set
board = pcbnew.GetBoard()
footprints = board.Footprints()
for fp in footprints: # note: no more completion occur below loop...
ref = fp.Reference()
ref.SetVisible(visibility)
#
# type enter for 2 times
# Close the PCB and open again to see the result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment