How do you change the netclass while routing?

Hi, I am using Kicad 6.0.7. I am in layout and cannot work out how to change the netclass of the wire I am routing. Does anyone know?

I have 2 netclasses at present that I created in the schematic editor and wish to switch between while doing the layout.

I assume there is a keyboard shortcut to quickly switch the current netclass in the layout editor but googling results in no info. Thanks.

It doesn’t really work like that, a netclass is a property of a net, not a currently active set of routing settings. You can switch the track width and via settings though. Add some others in your board setup and then you can switch back and forth with W/w (don’t remember the matching hotkeys for via) or just press q to edit the values numerically.

1 Like

I have 2 netclasses at present that I created in the schematic editor and wish to switch between while doing the layout.

This is not how netclasses work. Netclasses are assigned to individual nets in the schematic. Than this netclass-setting is a property of this wire and after “update board from schematic” the corresponding tracks are also assigned to this netclass.
One net/wire/track can only have one netclass., you can’t switch between netclasses.

1 Like

I click X. It starts routing but wait! The wire is of the wrong netclass! How do I switch the netclass for the wire to the right one? This is my question.

So far it seems that the netclass must be set in schematic editor. I suppose it makes sense, but sometimes I prefer to change the netclass from layout editor depending on size constraints.

You can change it in the board editor also, in Board Setup. Just not while routing.

1 Like

Okay, but where do I set the net class? I have set up 2 net classes but cannot work out simply how to set a net class for a particular wire.

each net gets assigned a netclass (by default, the “Default” netclass) in the board settings window.

You can change the netclass for each net by clicking “Default” in the bottom right net/netclass window, or by playing with the filter and assign tools on the bottom left side.

A net class does not work on a “wire” scope, but a netclass works with a net scope. All pins which are part of the same net are also always in the same netclass.

As has already been mentioned, you set up the net classes in: PCB Editor / File / Board Setup / Design Rules / Net Classes. You do not only define the net properties (such as track width and clearance) there, but you also assign nets to a netclass.

All nets are listed in 1). and the net class to which those nets are assigned are listed on the right side of it. By default all nets are shown in 1). but you can also apply a filter with 2). and then assign a net to the filtered list with 3).

1 Like

Okay I’ve worked it out.

There is a drop down list at the top left of the layout editor. I just need to do “Edit Pre defined sizes” and suddenly I can change the wire thickness easily from the drop down box. No need for net classes!

Thanks for all the tips and sorry if my question wasn’t clear.

This is true, but netclasses are powerful and it’s usually worth using them to give yourself a reasonable baseline trace thickness for each net. You can still override them as desired if you want a thinner or thicker trace for a particular part of your layout.

Instead of just using the “Pre-defined Sizes”, it’s much better to combine them with the net classes.

Good practice of setting up net classes starts with naming your nets in the schematic, so you know which is which, and then divide all nets into a handful of net classes, (More then a handful is rarely needed) It’s common to use a net class with thin tracks and narrow clearance for signals, and thicker tracks for power).

The main use for the Pre-Defined sizes is for when you want do deviate from de defaults assigned by the netclass for some reason. In such cases you can quickly switch to those other sizes.

But overall, setting up net classes, so each net has a default is much better then toggling with “pre-defined sizes” all the time.

Okay, understood. I’ll try naming nets in future and then do net classes. The current design I have is fairly simple.

I didn’t found net classes very useful in the sense of track width. Let us assume I’d like to route VCC with 1.5mm track width. I typically have to start it with thinner track (let say 0.25mm) do a short track inside pad then change width to 1mm and go out of pad as 1mm (the next short track) and then I change it to 1.5mm to route for a long distance and when coming to the end the opposite process takes place with the problem that I can’t do the change (or just finish routing) being inside pad but not at its center (pad center attracts the cursor). I know that I can switch snapping on/off but I had to do it frequently. At least in V5 it worked that way. I didn’t checked it with V6 yet as I designed only one very small PCB (something about 10x20mm) with no such tracks. I have written a bug report (something about 3 years ago) suggesting to limit snapping to specified distance in screen pixels what would allow just by increasing the view scale to do what you want being inside a pad. Don’t know if V6 has it.