Generated Macros

In some areas macros can be generated from the LayoutEditor:

Technology Macro

Often different layer setup are required, however, not all file formats can store layer information. To export the current layer setup a setup macro with a the layer information can be generated. This macro also includes the 3D information of the layer and some technology setup. The button to trigger this macro generation is located in the Layer Manager. You need to press the little + symbol in the lower left of the Layout Manager to see the button.

Example Macro:

#!/usr/bin/layout
#name=layer setup macro
#help=setup macro automatic generated

int main(){
layers::displayedLayers=1000;
layers::enableAllLayer();
layers::num[0].name="error";
layers::num[0].setStyle(7);
layers::num[0].setColor(255,0,0);
layers::num[0].set3dView(0,0);
layers::num[0].shortkey="e";
layers::num[1].name="CMF";
layers::num[1].setStyle(6);
layers::num[1].setColor(197,217,43);
layers::num[1].set3dView(0,0);
layers::num[1].shortkey="a";
layers::num[2].name="L9";
layers::num[2].setStyle(9);
layers::num[2].setColor(255,237,216);
layers::num[2].set3dView(0,0);
layers::num[2].shortkey="w";
layers::num[3].name="L5";
layers::num[3].setStyle(9);
layers::num[3].setColor(255,138,140);
layers::num[3].set3dView(0,0);
layers::num[3].shortkey="Shift+w";
layers::num[4].name="L8";
layers::num[4].setStyle(9);
layers::num[4].setColor(202,188,109);
layers::num[4].set3dView(0,0);
layers::num[4].shortkey="i";
// ....
layers::technologyLayerRemoveAll();
layers::technologyLayerAdd(9,2);
layers::technologyLayerSetParameter(9,0,0);
layers::technologyLayerSetParameter(9,1,100);
layers::technologyLayerSetParameter(9,2,100);
layers::technologyLayerAdd(10,1);
layers::technologyLayerSetParameter(10,0,1);
layers::technologyLayerSetParameter(10,1,100);
layers::technologyLayerSetParameter(10,2,20);
layers::technologyLayerSetParameter(10,3,25);
layers::technologyLayerSetParameter(10,4,100);
layers::technologyLayerSetParameter(10,5,0);
layers::technologyLayerAdd(11,2);
layers::technologyLayerSetParameter(11,0,2);
layers::technologyLayerSetParameter(11,1,140);
layers::technologyLayerSetParameter(11,2,130);
layers::technologyLevelFrom3d();
}

Bundle Format

Similar to the Technology Macro the LayoutEditor Bundle format contains a macro with the layer setup. Additonal it contains the setup of the background images and the opened layout and schematic designs. The Bundle format can be created with Save As and loaded with the normal Load feature.

View Macro

The command string drawingField::getViewMacro() will create a little macro that restores the current display view of the layout. The name of the cell and the view location will be stored.

#!/usr/bin/layout
#name=View Macros
#help=View Set Macro automatic generated

int main(){
layout->drawing->setCell("test");
layout->drawing->setView(0.096321526,1087,7893);
}