Python scripting: creating a list of vias

To get a list of tracks in a board I do this:
for trk in myBoard.GetTracks():
trackList.append(trk)

How do I do this for vias? Couldn’t find a ‘GetVias()’ method?

Vias are tracks and are included in GetTracks(). Check if a track is a via with GetClass()

1 Like

Thanks, works great.