I would loop over the SMD pads, then call the Pick method to find any vias in the pad area on that pad layer.
mhm. Good Idea. In the meantime I have have tested a little bit ... 2 "stupid" for loops, the first over Pads (to do: check only smd pads) and the second "inner" loop over the via collection. I have to fasten up the whole, may be an array indexed search is a good practice, but with this I'm not already good .... I have to try it out. Also I have to find out outer dimension of the via, to check, if via touches the pad or not. At the moment I get only drillsize of the via and not outer dimension .... so... there is some work to do ....
When script is working well for me, I will show it here .... maybe another can use this this ....
it works for me. A little bit slow and I check only Drillsize, but for me it's fine.
The script is "as it is", no warranties or support.
Improvements are welcome.
Nachricht geändert durch michael.weber Version 2. I speed up Checking by using a via-coordinate array. I check pad against via-drillhole, cause at the moment I cannot grab the via-copper geometry.
Layout_ViaInPad.zip 2.8 KB