Find tracks with a specific width

Hello,

I’m wondering if is there a way to select tracks with a specific width. I can not find it.
I’m running KiCAD 7.
I’ve a board with mixed tracks width for the same net class and I would like to check it.

Thanks!

What do you want to do after you select them?

I’m wondering if is there a way to select tracks with a specific width.

No, not as builtin function.
Maybe there is a plugin/script available for this task.
(In my personal view this task is very good suited for a plugin solution)

For the future there is a open gitlab issue which adresses your question: Properties Search / Parametric Search (#8390) · Issues · KiCad / KiCad Source Code / kicad · GitLab

in scripting console:

import pcbnew
b = pcbnew.GetBoard()
tracks = b.Tracks()
for t in tracks:
    if t.GetWidth() == pcbnew.FromMM(0.25):
        t.SetSelected()
        
pcbnew.Refresh()

(tested on 8.0.1)

3 Likes

It’s not perfect but you may get what you want depending on your layout and what/how you setup the selection’s…

Example showing two tracks of different Width…, if you want to have/set all of the Tracks in a specific Net at a particular Width, set the Net selection checkbox…

Off-Screen is: File>Edit_Track_Via…

Thanks all.

@ baldengineer
Just checking that I’ve not forget to change some width
@ mf_ibfeew
Thanks
@ BlackCoffee
I want to select al the tracks not manually as the screencast shows
@ adamws
It seems what I’m searching form but I’m not able to run this. I’ve to investigate. If you have any link that will help me please share it with me.

You can Window-Box Select all of them, or some area of interest. You can use the Panel I show but don’t Check the ‘Only Include Selected’, check the filter by Net, or whatever you want to do…

I get it, but i just want to find which track is 0.2 not to change the width of that tracks.

Your Post title (and text content) say’s “Select” so, I thought you meant ‘Select’. If you meant ‘Find’ then edit your Title/content so other have clarity of what you want…

I’ve edited the post title.

1 Like

I set some of the Track-Segments (they are on different layers) to be 0.2mm Width.

Using the Code posted by @adamws, I changed the Width to ‘search for’ from 0.25 to 0.2

Paste and Run

All of the 0.2mm segments get Highlighted. (somewhat difficult to see after Video Encoding but, they’re selected and Highlighted. Thus, you/user can see what tracks are 0.2mm wide

1 Like

Thank you!
That’s what I need.

My error was pasting the code then running it with the Enter command, with the “paste and run” function I’m able to run it.