The main window of the layout design. More...
This class is the main widget of the window from which the macro was executed. It is directly accessible via the classname "layout" from any C++ macro.
layout->filename="/var/layouts/samples1.gds";
layout->newCell();
Most methods of this call require a user dialog. A direct access of the drawing is possible via the member drawing to an object of the class drawingField.
Further modules to modify the design data are available with the pointers backgroundTool, barcodeTool, booleanTool, drcTool and netlistTool.
In LayoutScript for Python and for Ruby the keyword layout does not exists. A new layout object had to be created via the project class.
l=project.newLayout() # open new instance of layout class for Python
l=Project.new_layout() # open new instance of layout class for Ruby
Set the feature of an extra keyboard. key is the number of the key. It is numbered from 0 to the amount of keys the keyboard has. function is the feature code of the featur you want to add. As toolbutton, modification of the extra keyboard are not store and it is recommended to set it with an autostart macro. (introduced with release 20210905)
Will set an key of an external keyboard to a macro. key is the number of the key at the keyboard. macroFileName os the full path of the macro, title the capture and IconFileName the full path of the icon file. (introduced with release 20210910)
Adds a macro named macroName to the menu of the LayoutEditor by copying the macro to the LayoutEditor folder inside you home folder. The menu position is define by the list menu. For example if the list contains two elements Utilities and My_macros, the macro will be displayed inside theUtilties/My_macros sub menu. In contrast to layout::addMacroToolButton the macro will stay in the menu with any restart. To remove the macro delete the copied version of the macro in the mentioned folder. The method will adjust the setting for setup::macroPath by adding home/LayoutEditor/menu to it if required. (introduced by version 20210612)
Adds a new button to the toolbars. The button will be added to the toolbar 'Macros'. If this toolbar does not exist, it will be created. macroName specifies the name of the macro to be executed. It should include the full path to the macro. iconfilename points to the file for the icon of the new button. If the given file does not exist, the default macro icon is used. parameter should be an empty string. It may be used in furture updates to give additional information to the macro. Macrobuttons will not stored with shut-down. It has to be restored with a further macro call. So usually this method is used in a autostart macro that is automatic started after program start.
The background utilities to add images in the background are accessible via this pointer to the class backgroundTool.
The barcode utilities are accessible via this pointer to the class barcodeModule.
The boolean utilities to perform Boolean Operations are accessible via this pointer to the class barcodeModule.
A file dialog to select a filename is opened. The selected file will be loaded.
A file dialog is shown. The selected file will be imported and added to the existing file.
The current design will be removed and an empty design is shown like after the program start.
If it is true, the debug mode is on. In the debug mode additional information is printed to the terminal where the LayoutEditor is started. If the LayoutEditor was not started from a terminal the output is not visible.
This pointer to class drawingField is the main class of the drawing. It holds all relevant information of the design.
The design rule checker is accessible via this pointer to the class drc.
Another macro is executed. The execution of the calling macro stopped until the termination or completion of the started macro.
Parameter: | |
---|---|
filename | filename of the macro to be executed |
Returns: the exit code of the called macro
a utility tool to extract electrical parameter from the design
This string hold the filename of the current opened design. In case of an OpenAccess design it contains the library name with an extension '.oa'.
The user will be prompted to enter a boolean.
Parameter: | |
---|---|
caption | title of the window |
label | text in the dialog inside the window |
Returns: 0 if yes/true is selected, otherwise '1' is returned.
A user interface to select an exinsting folder is displayed (introduced with release 20201123).
Returns: the folder choosen by the use, an empty string is returned in case the operation was canceled.
The user will be prompted to enter a double.
Parameter: | |
---|---|
caption | the title of the window |
label | this string will be displayed inside the window |
value | default value |
digits | maximal number of digits |
Returns: the double entered by the user
The user will be prompted to enter a integer.
Parameter: | |
---|---|
caption | the title of the window |
label | this string will be displayed inside the window |
value | default value |
Returns: the integer entered by the user.
The user will be prompted to choose a item from a list.
Parameter: | |
---|---|
caption | the title of the window |
label | this string will be displayed inside the window before the list |
values | a list with all items |
Returns: the item text choosen by the user. An empty string is returned in the case the Cancel button was pressed.
The user will be prompted to choose a layer from a list of all existing layers.
Parameter: | |
---|---|
label | propt text of the dialog |
value | default value |
Returns: the layer number entered by the user. -1 is returned in the case the Cancel button was pressed.
The execution of the macro is stoped until the user entered a mouse inside the drawing by mouse. The entered mouse position is returned. The user has full control of the displayed design like changuing the displayed cell or zoom in and out. (introduced with release 20191207) This feature is only available in C++ scripts.
A file open dialog is shown. The optinal parameter filter set the default filter use in the dialog. The filter format is "filtername (*.ex1 *.ex2)". With path the folder the dialog starts with is set.
Returns: a string with the filename or a empty string if the Cancel button was pressed.
Returns: a string with some statistic information on the design.
A file save dialog is shown. The optional parameter filter set the default filter use in the dialog. The filter format is "filtername (*.ex1 *.ex2)".
Returns: a string with the filename or a empty string if the Cancel button was pressed.
The user will be prompted to enter a value in userunits.
Parameter: | |
---|---|
caption | the title of the window |
label | this string will be displayed inside the window |
value | default value in database units |
Returns: value entered by the user in database units
The user will be prompted to enter a text.
Parameter: | |
---|---|
caption | the title of the window |
label | this string will be displayed inside the window |
value | default value |
Returns: the text entered by the user. An empty string is returned in the case the Cancel button was pressed.
Returns: an encoded string containing all required information to restore the current toolbar and dock window setup. With setToolbarState the current setup can be restored
Returns: a string with the current version number of the LayoutEditor. (introduced with release 20201223)
Hides the toolbar with the name.
paused the macro and enables user interaction to the design. The macro is continued with a right mouse click in most modes. (introduced with release 20191209) This feature is only available in C++ scripts.
Holds the name of the toolbar containing custom macros. The name must be set before the first macro is added to the toolbar. (introduced with release 20211216)
The netlist utilities are accessible via this pointer.
Returns: true if an layout window was already created during the start of the software. By using autoLayerMacro.layout macro it can happened that the macro is executed before a layout object is available and its methods can be used. With this method this can be checked without causing an an error rising up. This method is only available in C++ macros. (introdiuced with release 20201201)
Returns: true if a layout window is currently visible on the screen. This function is indended to avoid any output on a non-visible window like a layout->showStatus("text");
. (introduced with release 20201230)
The design with the name fileName is opened. If the current design was changed, you will be asked to save it before.
A printer dialog will be opened.
Resets the shortcut with the feature code as parameter to its default value. (introduced with release 20231115)
The current opened design will be saved to disc. If the meber variable filename is empty, you will be prompted to enter a filename.
You will be prompted to enter a filename. The current design will be saved.
The screen view will be saved. You will be prompted to enter a filename. The screen resolution is used for the pixel gaphic.
You will be prompted to select a cell. The cell will be displayed.
You will be prompted to enter a name for the current displayed cell.
Sets the display of the layer window inside the layout window. (introduced with release 20180614)
sort value | sorting |
---|---|
1 | layer as list |
2 | layer as block |
3 | sort by name |
4 | sort by number |
5 | sort by 3d lavel |
disabled or enabled a single menu entry or a hole menu. (introduced with release 20191206)
layout->setMenuEnabled("Draw/Merge",false); // the merge item in the draw menu will be disabled
layout->setMenuEnabled("Draw/Merge",true); // enabled again
layout->setMenuEnabled("File",false); // the file menu will be disabled
layout->setMenuEnabled("Utilities/Misc",false); // the Misc menu within the Utilities will be disabled
Use this function to modify any existing shortcut. It returns true, if the modification was successful. & marks the underline in the menuname. As normally always the first character is underlined, add a & in the front.
layout->setShortcut("&Zoom Fit All","F"); // set 'F' to zoom fit
layout->setShortcut("&Zoom Fit Selection","Shift+F"); // set 'Shift F' to zoom fit selection
Shortcuts are not saved with program shutdown and the modifications will not affect new opened windows. So it should usualy placed in a autostart macros to have the modified shortcut available in all windows.
As the overloaded method, but with the feature code as parameter.
Snapping to grid is activated or deactivated depending on the given bool value.
Snapping to point is activated or deactivated depending on the given bool value.
Snapping to middle of a line is activated or deactivated depending on the given bool value.
Snapping to line is activated or deactivated depending on the given bool value.
Snapping to shape center is activated or deactivated depending on the given bool value.
Snapping to intersections is activated or deactivated depending on the given bool value.
disabled or enabled a toolbar. (introduced with release 20191206)
layout->setToolbarEnabled("Edit",false);
Sets the toolbar and dock window configuration. The string parameter needs to be created with the getToolbarState.
A message will be displayed.
Parameter: | |
---|---|
caption | the title of the window |
label | this string will be displayed inside the window |
A message will be displayed in the statusbar for 2 seconds. The macro will continue to run. If the further status message is posted before the 2 seconds are over, the existing message is exchanged.
Parameter: | |
---|---|
label | text displayed in the status bar |
Will create a new text Editor window in a thread save way.
Shows the name toolbar.
Add a new tool bar, separate multipli buttons with a ';'. Next to the feature name the feature code can be use to spezify the feature.
layout->toolBarAdd("my toolbar","New Layout;Zoom Mouse;Code 39;Quit");
The 3d view is accessable via this class.
After a confirmation the current display cell will be deleted. If there are no more cell in the drawing, a new empty cell will be created.
OBSOLETE: Please use drawing->deleteCurrentCell() instead.
All selected elements are moved to a new cell. A correlating cellref will be added.
OBSOLETE: Please use drawing->group() instead.
A new empty cell will be added, named with an unused cell name and it is set as current cell.
OBSOLETE: Please use drawing->newCell() instead.
The screen will be saved in the file with the name filename. The type is selected by the extension.
OBSOLETE: Please use drawing->saveScreenshot(string filename) instead.
renderAll will be called after the macro terminates.
OBSOLETE: Please use view3dTool->trigger3dRenderAll() instead.
renderAuto will be called after the macro terminates.
OBSOLETE: Please use view3dTool->trigger3dRenderAuto() instead.
renderSeclect will be called after the macro terminates.
OBSOLETE: Please use view3dTool->trigger3dRenderSelect() instead.