Select tracks by name or net class


#1

At the moment I am using KiCad version 5.1.2.

My goals is to make a list of track lengths for DDR memory. Now I am using the “Kicad_action_plugins” that includes “Length stats” which works nice.

Now I want to be able to select a group of tracks so I can generate a Track Length List, like searching for DDR_D* which would select DDR_D1, DDR_D2 and so on.
Now I know that I can make a Net Class which I did, but this is not selecting the Tracks that are in the Net Class.
I realize that I can hold CRTL and click on the nets, but that is too time consuming as for the amount of traces.

I have searched a lot on google and this forum, but I cannot find it. Does someone have an idea?


A plugin category similar to the way the FAQ is handled?
#2

Cast spell :hotsprings: to summon @MitjaN.


#3

I’ve been summoned :smile:.

Nice to know that the plugin is useful. Would the possibility to select and remove items on the netlist be a step in the right direction? This way could select whole board, run the plugin and remove redundant nets. If so, please raise an issue on github so that it remains in the pipeline and will not be forgotten.

Otherwise I don’t have a direct answer to your question. And while additional selection filtering would be a nice addition to KiCad, it cannot be implemented via action plugins as upon plugin completion everything is deselected (at least on windows)


#4

Nice entrance! :grin:

This would be useful only for this specific function. Just in general sometimes it is convenient to light up a selection of routes especially when the board is full of it. For example: either search for a string using wildcast for selecting tracks or choose a Net Class which will select the Tracks on the board. From this way using a plugin to manipulate Tracks or just for the overview.
Not sure if I summon the kraken to mention this is something I miss when stepping off from eagle. Besides that it works really nice.
Thanks!


#5

First check the bugtracker, and if this is not already on it, post a bug as a wishlist item.

You might want to look at PadPainter by @devbisme . It does not select, but it should help you locate pins. It can probably be changed to select tracks. I’ve just discovered it a couple days ago and I did not get it to work, but I have to test it thoroughly before I raise an issue.


#6

This was easier then I expected. It has just been published on github, so you are welcome to try it out.


#7

I have tried it out and it works like a charm.
Thanks a lot!


#8

Now that I am using it to route my DDR, is it easy to build in the function to select/highlight the Track that I select in the list of “Length Stats”? This would be super convenient if I see a Track is too short and I need to use “Tune Track Length”.
It is not important that it will be deselected after closing the plug-in, as it is only to see where the most convenient spot is located to make the S-Shape and to see where in between the many tracks the requested track is.
This idea is mainly for the plug-in change only.


#9

I’ve tried to select and highlight tracks and pads previously but I’ve had no luck as all my plugins were modal (doing their thing once the user hit OK button, and after the plugin ran it exited) thus pcbnew refesh after plugin closed cleared the selection.

I’ll try this out with this plugin as it is my only non-modal plugin, and it might work.


#10

Ok :slight_smile:

I have noticed something that is convenient and might be a simple thing.
The table of Length stats has 2 columns and if I for example had DDR signals they all start with the same prefix. So with DDR_D… or DDR_A…
Is it possible to make a sorting of the list when you click on the column header? Like ascending sort and descending sort?


#11

As a stopgap measure, I’ve statically sorted the nets. Dynamic sorting (by name ascending/descending) or by length (ascending/descending) should come shortly.

BTW,

I’ve added highlight code, but on my machine (V5.1.2 on Win7) does not do anything. Please check if it works for you.


#12

Thanks!

It is 9:30am here and I will try it in the evening.


#13

Sorting should work now


#14

Thanks! It works perfect.

When I click on the net in the “Length stats” it will highlight the complete net bright green including Vias. It is not like the “Highlight net” from KiCad right panel which will make the rest of the screen darker and light up only the requested net, but it sure works good by having a green bright highlight of the full net as it is now.
The net keeps being highlighted all the time even when I start editing the net. Seems ok.

The sorting also work very good. Now I have all DDR lines on one line which makes it easy to remove all other nets I don’t need.

Thanks!


#15

I noticed that highlight of the track stays active all the time. When the net is light up bright green by the “Length status” and I close the window of “Length status” then a part of the track stays bright green. I need to restart KiCad to get rid of the bright green colour. Somehow the highlight of the net is not reset, but when I select a different net from the list then it will be reset for the previous track and the new net will light up. So it is always the last track that stays highlighted.


#16

As I don’t know which version were you using it is hard for me to tell, whether you experienced a bug that was present and hase since been corrected or is this something new. You can find the version info either looking at version.txt file in the plugin folder or you can look in the length_stats.log file, which should be in the project folder.

BTW you can ‘highlight’ more than one net using ctrl or shift key.


#17

I see it is version 16 of Length stats. I worked for it a while and the bug is not disturbing, just wanted to mention. In general works convenient. :slight_smile:


#18

I think we can close this topic, unless you want me to test something :slight_smile:


#19

I’ve jsut added instrumentation to the plugin, so if you will use it in the future I’d rather see if you use this version, and if you find a bug, please send me the length_stats.log file. Otherwise this topic can be closed.


#20

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