Support Forum

Macro or Scripting for text arrays for numbering and positioning data - Programmatic text

Thursday 30th November 2023
Hi, I am trying to find a way to mark row and column numbers on a wafer. Is there a way to programmatically place this text? For instance, having a nested loop that does 20 columns, and 20 rows, starting at some point, with a row pitch of X, and a column pitch of Y, and it displays text as ROW_NUMBER COL_NUMBER, like "03 04". Want to avoid manually setting text 400+ times. Just can't find the right reference for macro/script/C++ that I could use for creating this solution. Thank you for your help and time! Cheers,
Friday 1st December 2023
Hi, there is an example script shipped with the LayoutEditor exactly doing this. It is stored within the LayoutEditor package under macros/examples/label.layout. The complete macro: ```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(); } ```