the fair gds editor StepperBarcodeMacro

Stepper Barcode Macro

This macro creates a barcode use by some photo mask stepper to identify the mask.

Download: barcode.layout

   1 #!/usr/bin/layout
   2 #name=Macro: barcode.layout
   3 #help=Recorded Fr. Jan 8 2010
   4 
   5 
   6 int main(){
   7 string oldCell=layout->drawing->currentCell->cellName;
   8 string text="IAKL1038-MJ16A-BW29A";
   9 layout->newCell();
  10 layout->drawing->currentCell->cellName="barcode";
  11 layout->drawing->p(0,0);
  12 //layout->drawing->p(54030,4000);
  13 layout->drawing->p((text.length()+3)*2040-150,4000);
  14 layout->barcodeTool->setCode39Mod43();
  15 layout->barcodeTool->ratio=2.2;
  16 layout->barcodeTool->addBarcode(text);
  17 int defPre;
  18 defPre=setup::defaultTextPresentation;
  19 setup::defaultTextPresentation=16;
  20 layout->drawing->point(0,8000000);
  21 layout->drawing->text(text);
  22 setup::defaultTextPresentation=defPre;
  23 layout->drawing->selectAll();
  24 layout->drawing->setWidth(3000000);
  25 layout->drawing->toPolygon();
  26 layout->drawing->deselectAll();
  27 layout->drawing->setCell(oldCell);
  28 layout->drawing->selectAll();
  29 layout->drawing->p(0-66000,2540-2000);
  30 layout->drawing->cellref("barcode");
  31 layout->drawing->invertSelect();
  32 layout->drawing->p(0-66000,2540-2000);
  33 layout->drawing->rotate(90);
  34 layout->drawing->deselectAll();
  35 layout->drawing->scaleFull();
  36 }

See also


CategoryMacro


StepperBarcodeMacro (last edited 2010-12-15 10:43:36 by dslb-092-075-140-183)