-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathpad count.il
47 lines (36 loc) · 988 Bytes
/
pad count.il
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
axlCmdRegister("test",'test)
defun(test ()
file = axlTempFile()
port = outfile(file)
axlVisibleDesign(nil)
axlVisibleLayer("PIN/SOLDERMASK_TOP" t)
axlVisibleLayer("PIN/SOLDERMASK_BOTTOM" t)
axlVisibleLayer("PACKAGE GEOMETRY/SOLDERMASK_TOP" t)
axlVisibleLayer("PACKAGE GEOMETRY/SOLDERMASK_BOTTOM" t)
axlVisibleLayer("VIA CLASS" t)
axlSetFindFilter(
?enabled list("noall" "pins")
?onButtons list("noall" "pins")
)
axlAddSelectAll()
all = axlGetSelSet()
pad = all
drl = all
axlClearSelSet()
foreach(i all
if(i->isMech then pad = remove(i pad))
unless(i->isThrough drl = remove(i drl))
)
pad_count = length(pad)
axlSetFindFilter(
?enabled list("noall" "vias")
?onButtons list("noall" "vias")
)
axlAddSelectAll()
all = axlGetSelSet()
axlClearSelSet()
drl_count = length(drl) + length(all)
fprintf(port, "Pads amount is %d\nDrill amount is %d\n", pad_count drl_count)
close(port)
axlUIWExpose(axlUIViewFileCreate(file "Report" nil))
)