It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I'm having trouble getting started with writing macros. I started with the the basic example from https://www.klayout.de/doc/programming/python.html. I pasted the code into a new python macro and was able to run it and have it draw the rectangle, but then, I maybe accidentally changed a setting that's made macros stop working. In the console it says the macro has been run, but it isn't drawing anything. Here's a screenshot of my macro IDE (link removed).
Sorry if this is a really silly question.
Comments
Hi,
Not a silly question :-)
Assuming your code is similar to the one above, nothing is displayed in my environment either.
But it generates the GDS file.
Since the code does not control the layout view, this behavior is normal.
Could you immediately see the rectangle in the KLayout's main canvas?
I guess you opened the generated GDS file.
A sample code below will behave as you expected.
Kazzz-S
Hi @DGillam,
I have removed the external link in your original post as it pointed to a suspicious page heavy in advertising links. Please paste the image directly.
Matthias