How to list all footprints on a PCB in KiCad using Python?
Use the following Python script in KiCad's Python environment:

```python
import pcbnew

def list_footprints_on_pcb():
    """
    Lists all footprints on the current PCB, along with their reference and position.
    """
    # Load the current board
    board = pcbnew.GetBoard()

    # Iterate through all footprints on the board
    for footprint in board.GetFootprints():
        ref = footprint.GetReference()
        pos = footprint.GetPosition()

        # Convert the position from nanometers to millimeters
        pos_x_mm = pcbnew.ToMM(pos.x)
        pos_y_mm = pcbnew.ToMM(pos.y)

        print(f"Footprint: {ref}, Position: ({pos_x_mm:.2f}, {pos_y_mm:.2f}) mm")

# Run the function
list_footprints_on_pcb()
```

This script lists all footprints on the current PCB, showing their reference designators and positions in millimeters.