Macro Example 7
This example is a multi rule DRC check.
Download: Sample7.layout
This examples is also included in any LayoutEditor package in the folder macros/examples.
1 #!/usr/bin/layout
2 #name=Macro: drc example.layout
3 #help=example for a drc macro
4
5
6 int main(){
7
8 layout->drcTool->result="DRC (LayoutEditor example) \r\n";
9
10 // setup error layer
11 layout->drawing->activeLayer=0;
12 layout->drcTool->setErrorLayerToActiveLayer();
13
14 // check for layer metal 1
15 layout->drcTool->ruleName= "Minimum Size Metal1";
16 layout->drcTool->minimumSize(800,6,true);
17 layout->drcTool->ruleName= "Minimum Distance Metal1";
18 layout->drcTool->minimumElementDistance(800,6,true);
19
20 // check for layer metal 2
21 layout->drcTool->ruleName= "Minimum Size Metal2";
22 layout->drcTool->minimumSize(900,8,true);
23 layout->drcTool->ruleName= "Minimum Distance Metal2";
24 layout->drcTool->minimumElementDistance(900,8,true);
25
26 // check for via1 (metal1 to metal2)
27 layout->drcTool->ruleName= "Via in metal1";
28 layout->drcTool->inside(50,7,6);
29 layout->drcTool->ruleName= "Via in metal2";
30 layout->drcTool->inside(60,7,8);
31
32
33 layout->drcTool->showReport();
34
35 }