Is it possible to automate via placement at an offset from a component pad using Python in KiCad?
Yes, it's possible to automate via placement at an offset from a component pad using Python in KiCad. The given script places a via at a defined offset from pad #2 of 'R2':

```python
import pcbnew
from pcbnew import wxPoint, wxPointMM

board = pcbnew.GetBoard()
pad = board.FindFootprintByReference('R2').FindPadByNumber('2').GetCenter()
via_location = wxPoint(pad.x + 1 * pcbnew.IU_PER_MM, pad.y)
add_track(pad, via_location)
via = pcbnew.PCB_VIA(board)
via.SetPosition(via_location)
via.SetDrill(int(0.4 * 1e6))
via.SetWidth(int(0.8 * 1e6))
board.Add(via)

pcbnew.Refresh()
```

This approach is useful for precise via placement in PCB designs, particularly when specific electrical or mechanical constraints need to be addressed.