Skip to content

Instantly share code, notes, and snippets.

@dhaillant
dhaillant / set_value_visible.py
Created October 8, 2021 17:58
Python script to batch enable/disable visibility of "Value" field in KiCad/PCBNew
# select the footprints with "name"
# and set value visibility to True or False
import pcbnew
def set_value_visible(name,visible=False):
board = pcbnew.GetBoard()
mods = board.GetModules()
name = "Euro Power Connector"
@dhaillant
dhaillant / list_attributes.py
Last active November 20, 2017 10:41
List KiCad pcbnew component attributes
#!/usr/bin/python2
import pcbnew
def list_attributes(filename):
"""Print footprint attributes of all components.
This function prints the reference, footprint and attributes
of all board components, in CSV format. It can be used to
check that attributes such as Normal+Insert or Virtual are
@dhaillant
dhaillant / kicad_picknplace_assistant.py
Last active November 20, 2017 15:57 — forked from simonfojtu/kicad_picknplace_assistant.py
KiCad PCB pick and place assistant
#!/usr/bin/python2
import re
import os
import numpy as np
import pcbnew
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle, Circle, Ellipse, FancyBboxPatch