The examples are available as package "www.klayout.org/examples" for installation with the package manager. Please use "Tools/Package Manager" and search this package in the list of new packages. Double click the package to select it and hit "Apply" to download and install it. All examples will be contained in this package.
To install a script individually, drag and drop the macro link (*.lym file) to KLayout's main window. If this is not possible - for example, because your KLayout instance does not have a network connection - download this file and put it into the "macros" folder of KLayout's home directory (usuall $HOME/.klayout/macros on Linux and %HOME%/KLayout/macros on Windows. After restarting KLayout, you should see the new example in the macro development IDE.
All example scripts will register themselves in the "Macros" menu in the "Examples" sub-menu.
For more information about script programming see Programming scripts. For the class reference see the Class Index.
browser.lym | Using the HTML browser dialog - a location browser | ![]() |
datamap.lym | Creating layouts: data visualisation | ![]() |
dump_menu.lym | Menus: dumping the menu structure | ![]() |
flatten.lym | Editing: hierarchical propagation | ![]() |
fractal.lym | Creating layouts: the Koch curve | ![]() |
qtdialog.lym | Using the Qt binding: creating a custom dialog | ![]() |
qtrubyserver.lym | Using the Qt binding: convert KLayout into a HTTP server | ![]() |
screenshots.lym | Using the HTML browser dialog II: a screenshot gallery | ![]() |
sokoban.lym | Dynamic database manipulation: a "Sokoban" implementation | ![]() |