Empty Cell Macro
This macro search a empty cell in the current design.
Download: emptyCell.layout
1 #!/usr/bin/layout
2 #name=#4: empty cell
3 #help=searches empty cells
4
5 int main() {
6 // get first cell
7 cellList *cells=layout->drawing->firstCell;
8
9 int num = 0 ;
10
11 // loop over all cells
12 while (cells!=NULL){
13 if (cells->thisCell!=NULL){
14 // get first Element of this cell
15 if (cells->thisCell->firstElement==NULL) {
16 layout->drawing->setCell(cells->thisCell);
17 }
18 }
19 cells=cells->nextCell;
20 }
21 }