/****************************************************************************** * APRINT.ULP - please send any comments to hv@itec-audio.com * * This EAGLE User Language Program generates * a Print Outline for the current board. * * V1.1 06.12.99 Printmaße und BoardInfo als Text ausgeben * V1.0 01.06.99 Printmaße können angegeben werden * Helmut Vaupotitsch - hv@itec-audio.com * * Units can be switched between mm and inch. * Errorlevel -1: Drawing is not a board * *****************************************************************************/ enum { unitMM, unitINCH }; int Unit = unitMM; // set this to the desired unit! real PrintX = 77.5; // 409 391 set this to the desired print size! real PrintY = 49; // 41 41 set this to the desired print size! string Script = "APrint.scr"; string unitName[] = { "mm", "inch" }; real Widths[] = { 2, 0.1 }; int unitPrec[] = { 1, 2 }; int RoundFactor = pow(10, unitPrec[Unit]); real Length = 0.1; // -> 10 percent of dim enum { OK=0, NotABoard=-1 }; int ExitCode; real RoundUnit(real x) { x = round(x * RoundFactor) / RoundFactor; return x; } /********************/ /* --- HP --- */ /********************/ ExitCode = NotABoard; if (board) board(B) { ExitCode = OK; real Width = Widths[Unit] / 2; real lx = RoundUnit(PrintX*Length); real ly = RoundUnit(PrintY*Length); // if (lxLAST_DATE_TIME (%1.3f %1.3f);\n", TextX,TextY); // printf("text %s: %s (%1.3f %1.3f);\n", B.name, t2string(filetime(B.name)), TextX,TextY); printf("Grid Last;\n"); } // Output } exit(ExitCode);