Saturday 5th December 2020
Hi, there,
Is there a way to automatically creat chip ID on the layout? I need a solution urgently. Will really appreciate your help.
Thanks,
Qingwei
Jürgen LayoutEditorFull Saturday 5th December 2020
Please have a look at the example macro named 'label.layout' in the folder macros/examples of the LayoutEditor package. (open it with the build in text editor and press the execute button to run it) That macro is exactly intended for this common application. Alternatively copy&past the macro below. Of course step&repeat as well as the id format needs to be adjusted to your needs.
```cpp
#!/usr/bin/layout
#name=label macro
#help=automatic labeling
int main(){
int x,y;
for (x=0;x<10;x++){
for (y=0;y<10;y++){
string s1,s2;
s1.setNum(x);
s2.setNum(y);
layout->drawing->point(x*1800,y*800);
layout->drawing->text("#"+s1+"/"+s2);
}
}
layout->drawing->selectAll();
layout->drawing->setWidth(400);
layout->drawing->toPolygon();
layout->drawing->deselectAll();
}
```
Qingwei
Monday 7th December 2020
Qingwei
Monday 7th December 2020
Thanks a lot, Jurgen. This helps a lot.
Qingwei