Deleting tracks with Python

Hi everyone,

I’m working on a small Python script for automating work. It would be really useful if I could do a global rip-up of all tracks - even better if I could ripup individual tracks.

I’ve searched the Python documentation, but I can’t find anything that lets me do this. Is it possible?

Call RemoveNative method on the track

1 Like

Thanks, that’s great.

For the benefit of anyone else coming to this in future, I also found you can do this to ripup everything:

board = pcbnew.GetBoard()
tracks = board.GetTracks()
for t in tracks:
    board.Delete(t)
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.