the fair gds editor OverviewCellMacro
Please Sign in

Overview cell

This macro will create a new cell in your design with an overview of any other cell of your design.

Download: overview.layout

   1 #!/usr/bin/layout
   2 #name=overview
   3 #help=generate an overview of all cells
   4 
   5 int  main() {
   6  stringList cellNames;
   7  // get first cell
   8  cellList *cells=layout->drawing->firstCell;
   9  point min; min.set(0,0);
  10  point max; max.set(0,0);
  11  // loop over all cells to detect size
  12   while (cells!=NULL){  
  13    if (cells->thisCell!=NULL){
  14        cells->thisCell->minimum(&min);
  15        cells->thisCell->maximum(&max);
  16        cellNames.append(cells->thisCell->cellName);
  17    }
  18    cells=cells->nextCell;
  19   }
  20   int spaceX=max.x()-min.x();
  21   int spaceY=max.y()-min.y();
  22   int num = cellNames.size();
  23   int row= math::sqrt(num);
  24   int x=0;
  25   int y=0;
  26   int i;
  27   layout->drawing->newCell();
  28   // place cells
  29   for (i=0;i<num;i++){
  30       layout->drawing->point(x*spaceX,y*spaceY);
  31       layout->drawing->cellRef(cellNames.at(i));
  32       x=x+1;
  33       if (x>row) { x=0; y++;}
  34   }
  35  layout->drawing->scaleFull();
  36 }

See also


CategoryMacro


OverviewCellMacro (last edited 2011-12-21 13:51:40 by dslb-088-065-253-206)