the fair gds editor MacroDump
Please Sign in

LayoutEditor Macro Dump

Any element of a design can also be created with a macro. Creating it by hand can be painfull, if all cordinates had to be entered by hand. To make this more simple the LayoutEditor Macro Dump file format was created. Saving to LayoutEditor Dump will create macro with all selected shapes. Calling this macro will create these elements again in a new design. Referred cells had already to exists in the deisgn. (introduced with version 20120824)

Macro Dump File Format

Internally a dump file format is nothing more than a simple macro, which will do the element creation. It persists on a header which does some basic definition and a part for each shape to be created. Here is an example of such a dump macro file:

   1 #!/usr/bin/layout
   2 #name=dump macro file: example.dump.layout
   3 #help=dump of selected shapes in cell example-cell
   6 int main(){
   7 element *e;
   8 point p;
   9 pointArray pa;
  10 cell *cr;cell *c=layout->drawing->currentCell;
  11 if (c==NULL) {c=layout->drawing->addCell()->thisCell;}
  13 pa.resize(5);
  14 pa.set(0,43715,4850);
  15 pa.set(1,44830,4850);
  16 pa.set(2,44830,4950);
  17 pa.set(3,43715,4950);
  18 pa.set(4,43715,4850);
  19 e=c->addPolygon(pa,5);
  21 p.set(2750,980);
  22 e=c->addText(12,p,"Vdd");
  23 e->setWidth(0);
  24 e->setPresentation(0);
  25 e->scale(20);
  27 cr=layout->drawing->findCell("Pad");
  28 if (cr!=NULL) {
  29 p.set(1600,2600);
  30 e=c->addCellref(cr,p);
  31 e->rotate(90);
  32 }
  34 }

CategoryFileFormat CategoryFullVersion CategoryFileFormatLayout

MacroDump (last edited 2014-09-26 14:36:18 by JurgenThies)