Skip to content

Instantly share code, notes, and snippets.

@kinoshita-lab
Created May 4, 2022 05:54
Show Gist options
  • Select an option

  • Save kinoshita-lab/784ca05a71e93ce8b33fdb9157121e15 to your computer and use it in GitHub Desktop.

Select an option

Save kinoshita-lab/784ca05a71e93ce8b33fdb9157121e15 to your computer and use it in GitHub Desktop.

Revisions

  1. kinoshita-lab created this gist May 4, 2022.
    11 changes: 11 additions & 0 deletions unko.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # 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