Example is artificial, but it uses both methods.
import pyaclass Subclassed_Timer(pya.QTimer): def __init__(self, parent, line_edit): super(Subclassed_Timer, self).__init__(parent) self.__count = 0 self.__line_edit = line_ed…
Hi, Ege!
I tried next code on 0.26.4 on Linux and it worked for me:
import pyaimage = \ pya.Application.instance().main_window().current_view().get_image(640, 480)print image.save("image_file.png")
You could try to change PYTHONPATH environment variable before launching KLayout, but you need to make sure that Python versions are same in you system and KLayout.
Python code should be in macro file (.lym) or called from such file. Code itself is executed inside KLayout, not external Python. See documentation. I provided link to sample scripts in yout past discussion.
Hi, Matthias!
Thank you for explanations! But is there good reason to keep MainWindow.status_bar internal and not documented? I don't think that status bar will be removed from KLayout GUI.
-Wcatch-value warnings. Such exceptions should be caught by const reference.
src/db/db/dbLayoutDiff.cc:1259:16: warning: catching polymorphic type ‘struct tl::CancelException’ by value [-Wcatch-value=]src/db/db/dbLayoutDiff.cc:1269:16: warning: cat…
Overall warnings by type statistics, but warnings may be duplicated because of different headers search paths:
cast-function-type 1cast-qual 14239catch-value= 25deprecated-copy 1046d…
Hi, Laurent!
Are RM1, RM2 and RM3 models? If so, you should have related .MODEL statements in your netlist. Otherwise they should be comments ($layer=RM1, etc) as extractor tools does for layout-related parameters.
You could also Google for HSpice…
Hi, Matthias!
Thank you for explanations! Actually I solved my problem in similar way :-)
Part of my question was to simplify list iteration search with KLayout API, of course, in case if KLayout keep internal indexes for layer view as map/unorder…
Hi, Antti!
Relative paths works for me, but I always put layout files in same directory with session file, so entries are just file names. There were issues with DRC relative file paths, but Matthias fixed them in 0.26.1.
Sorry, I didn't try to create shapes with Python, so I may be wrong, but I think Path is what you should use. Indeed, you should use linear approximation of original formula.