In my nearly finished layout I want to select all vias with a specific hole size and a specific diameter to change these values: All vias off (0,5/ 0,3) need to be changed to (0,6/ 0,25).
How do I select them?
There’s no such advanced selection filtering even in 5.99. Changing is easy after you have selected them (Edit -> Track & Via…). The best could be to use the python scripting console, but it needs a small script. Something like
import pcbnew
board = pcbnew.GetBoard()
for i in board.GetTracks():
… if (i.GetClass() == ‘VIA’ and i.GetDrill() == 400000 and i.GetWidth() == 800000):
… i.SetDrill(300000)
… i.SetWidth(600000)
I was also looking up Pcb Editor / Edit / Edit Track & Via Properties… when eelik posted.
With that dialog you can filter by net, or by netclass or by layer.
Which prompts me to as:
Do you know how net classes work, and have you used them in your project?
If not, then learn about it. With a netclass, you make a set of rules (track with & clearance, via dimensions, etc) and then you apply those rules to a net, or to multiple nets. Once you’ve set up your nets in net classes properly, your modification is likely also easy.
I use net classes in my project, its quite handy like you mentioned. But I use quite a few net classes and not all my nets are part of net classes.
I just use three different kinds of vias, so in the end I selected them manually by hand and used the dialog up ahead.
Unfortunately not, especially for 5.99 where the API has changed. We are waiting for the new stable API but before that what I gave should work (using the needed values, of course) because I tried it with 5.99. There’s one problem, the changes aren’t updated visibly to the view. IIRC closing and reopening pcbnew will help with that. But make sure you have backups or try first with a copy.