Does anyone know how to set all the selected line widths in one go?

Is python accepted:

import pcbnew

board = pcbnew.GetBoard()

for drw in board.GetDrawings():
    if drw.IsSelected():
        drw.SetWidth(int(0.1 * 1e6))

Above snippet sets line width for all selected drawing elements (lines etc.) to 0.1 mm. Note that 1e6 multiplier is required because internal units of kicad is nanometers.

3 Likes