/****************************************************************************** * DRILLS.ULP - please send any comments to hv@itec-audio.com * * This EAGLE User Language Program produces a list * of all the drills and holes of a board - without vias!. * * V1.0 19.05.99 Helmut Vaupotitsch - hv@itec-audio.com * * Errorlevel -1: Drawing is not a board * *****************************************************************************/ int AnzGes = 0; enum { OK=0, NotABoard=-1 }; int ExitCode; ExitCode = NotABoard; if (board) board(B) { ExitCode = OK; output(filesetext(B.name, ".DRH")) { printf("Detailed info on running DRILLS.ULP for board\n%s, modified on %s\n\n",B.name,t2string(filetime(B.name))); printf("*** Holes ***\n"); B.holes(H) { printf("X: %f Y: %f i: %f m:%6.3f mm\n", u2inch(H.x), u2inch(H.y), u2inch(H.drill), u2mm(H.drill)); AnzGes++; } printf("\n*** Elements ***\n"); B.elements(E) { printf("%s\n", E.name); /* printf("*** Package.Contacts ***\n"); */ E.package.contacts(C) { if (C.pad) { printf(" X: %f Y: %f i: %f m:%6.3f mm\n", u2inch(C.pad.x), u2inch(C.pad.y), u2inch(C.pad.drill), u2mm(C.pad.drill)); AnzGes++; } } /* printf("*** Package.Holes ***\n"); */ E.package.holes(H) { printf(" X: %f Y: %f i: %f m:%6.3f mm\n", u2inch(H.x), u2inch(H.y), u2inch(H.drill), u2mm(H.drill)); AnzGes++; } } printf("\n*** SUM: %d ***\n",AnzGes); } } exit(ExitCode);