Apply "automatically update via nets" when placing on zone, not just track

If have the “Automatically update via nets” option set on a via, and I place the via on to an existing track or pad that has a net assigned, the via gets set to that net. All good*.

But if I place it on an area filled by a zone, the via stays as <no net>. Why the difference? Sometimes there will be contention because the zones of different nets exist on different layers, but I don’t think that’s different to tracks or pads?

I’d like to place hundreds of stitching vias. Having them automatically adopt the net of the zone would be very handy! There’s ways around it, particularly since the majority will be GND, but I’d like be able to script this and would like to understand what I’m missing.

  • *Actually… I thought that’s what I was seeing. Now I see it doesn’t always work that way… even for tracks the net is sometimes not assigned. I really am missing something…

Screenshot 2023-05-19 at 5.01.29 pm

I’m sure you are aware . . . just in case you aren’t, you can place one via, set its net and then simply copy and paste it to your hearts desire . . . and if you are placing many it could be argued that this is actually quicker than placing one at a time with them being auto assigned to a net.

Yeah that’s fine. I can also bulk edit them which also works really nicely. But when different vias should be different nets it gets a bit tricky.

Because what I’m actually trying to do is port an OrCAD design:

https://twitter.com/HeathRaftery/status/1659452278645075969

So having them auto set nets based on their location would be handy. But what I’m doing is really unusual, so I don’t expect the tool to serve me particularly well because it’s not a normal workflow.

It’s just that now that I’ve done a couple of detailed OrCAD and Altium ports, I’m getting really, really intimate with very fine details of KiCad. And loving it. The custom rules, netclass clearances, zone priorities, stacked pads, fill overrides in footprints and pads, are all dead set amazing. Hopefully I can share some of these powerful tricks with others. I’ve been able to recreate some really peculiar design features from the other packages with native KiCad features, and do much of it programatically thanks to the Python console and text based file formats.

So occasionally I bump into functionality that I don’t understand well, and because I’m pushing it really hard, things I’d normally gloss over become apparent.

I did figure out that “automatically update via nets” not working for tracks was a glitch due to scripting (which was the original subject of my post, before I realised the zone thing while writing it!). If I position vias with .SetPosition() they don’t get a net assigned. But if I then manually move them all just a whisker, they do, and I can then undo the move and the assignment remains.

Except when the via is over a zone instead of a track/pad. Still haven’t figured that one out.

1 Like

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