The current link to the documentation is here:
http://www.klayout.de/doc-qt4/about/technology_manager.html
I was also looking for the file in which the "Layer Stack" information is stored and finally found it in my local user's klayoutrc…
Well, at least I found a workaround, by starting KLayout in Non-GUI mode (hidden views) instead of Non-GUI mode (database only, implies -nc):
klayout -z -r my_script.rb my_layout.gds
Otherwise I'd use the -zz parameter instead of -z to run scri…
Hi Matthias,
Thanks for the hint, my problem must have indeed been related to modified shapes: For example, I executed a prototype of the script which (inadvertently) modified the shape, and while I subsequently had fixed the script, the layout was…
Hi Matthias,
I've come across another case of this error (note I meanwhile have switched to KLayout 0.24.10), but this time I don't see any obvious way around the problem. Here is what I initially wanted to do:
alv.object_selection.each do |obj_i…
Hi Matthias,
Thank you very much for this information, I had indeed used a single loop to go through and modify the list of instances. Separating the loop into a "collect" loop followed by another "modify" loop as you suggested…
Hi David,
since 0.24 there already is a similar function: It is accessible via a Layout object and called create_cell which takes the name and a parameter map (see the documentation for more info).
By the way, some time ago I had pretty much the s…
Hi Matthias,
I am trying to understand/debug some behaviour when I start KLayout on the command line using the -zz option for batch-processing. This is the command:
klayout_app.exe -zz -rd input=original.gds -rd output=fixed.gds -r ./layerfix.rb
…
Hi Matthias,
Thanks a lot for your helpful reply!
As we tend to often have multiple top cells in intermediate steps while assembling the final layouts, I changed the test case construction code to create more interesting GDS files:
['ABC', 'XYZ']…
Matthias,
After a bit of research and spending some time on writing a rather minimal example exposing the problem, here it finally is:
Object.send(:remove_const, :PCell_gds_read_bug) if Object.constants.include?(:PCell_gds_read_bug)module PCell_gd…
Hi Matthias,
Thanks for your input. Not so much of a trick question but more of a slight uncertainty about expected PCell behaviour :-)
When I talked to my colleagues about the cake question, they also seem to think that having the ingredients fir…
Hi!
The easiest option would be to simply Save As... GDS text. As GDS isn't as rich as OASIS, the file might be missing some information that exists within OASIS, but depending on your specific use case, it might be enough.
Regards, Chris
Hi again,
Using the following code I derived from my previous example, I was able to get the key codes for pressed keys using the original QTableWidget object:
include RBAdock = QDockWidget::new("My Dock", Application.instance.main_windo…
Hi Dave,
I am not sure I understand your last comment - does that mean you did find a way now to catch events with the original QTableWidget instance?
If you're using the code from your previous comment, i.e.
class QTableWidget def keyPressEve…
Hi Dave,
I think the QWidget's keyPressEvent method is probably protected because only subclasses of QWidget are meant to override it.
Here is some code compatible with KLayout 0.24-python-eval which shows a QDockWidget in the main window which co…
Very nice, thank you for sharing, David!
I had a quick look at some of the files and think even if I don't need to use some of the functions, they are a great collection of KLayout's scripting capabilities and contain valuable "how-to" in…
Hi Matthias,
Thanks for pointing me to the "sessions" feature, I wasn't aware of that.
My use case for restoring the current view is very similar to the one that you currently have implemented in the File -> Reload menu item, just ins…
It may not be the most elegant, but I think the easiest way to restore the layer properties is to save them to a temporary file and load that file on the new layout.
Here is the code which will query the currently visible cell and view area, hierar…
Ah, seems like I was simply using the wrong method on the wrong object. Here is the fixed version, which works nicely:
# try to restore the current view with the new layout begin cell_name_to_index = {} acv = RBA::CellView.active …
Hi David,
Maybe I can help you out with this. As you probably know, the keyboard shortcuts are stored within the klayoutrc file. The contents of this file can be accessed through the API using the RBA::Application.instance.get_config_names, RBA::Ap…
(Quote)
The project I am working on aims at extending KLayout so it could replace some of our company's existing layout generation tools. Therefore I am investigating what can be achieved with the existing API, which leads to experiments such as the…
Hi Matthias,
I really appreciate your comments, even if they may cause a bit of confusion sometimes... (I do too).
Investigating a bit more I found that the coerce_parameters call I saw when loading a GDS file was done by a pcell_variant call from…
Hi,
I haven't tried running KLayout with the -z option set, but you can control the visibility of the main window using this:
mw = RBA::Application.instance.main_window # get the main window referencemw.setVisible(false) # hide the main windowmw.s…
Hi Matthias,
Apart from being tedious, I am not really sure whether it is even possible currently as I don't know if the "selection rectangle" can somehow be retrieved from within a script when the left mouse button is released.
(Quote)
…
Hi Matthias,
(Quote)
I guess that's fine as there is already a workaround: calling coerce_parameters like it is done in the pcell_variant code.
(Quote)
That would make the scripts a bit shorter (and maybe faster to run?), but since we already have…
Hi again,
I still believe that there is a problem in the Instance Properties dialog of KLayout version 0.24-python-eval when changing interdependent PCell parameter values. I documented the exact steps to reproduce the issue below. I updated the co…
Hi Matthias,
Am I correct in that the current implementation of RBA::Cell.change_pcell_parameter doesn't call coerce_parameters before produce?
Thanks, Chris
Hi Matthias,
(Quote)
This is great news, now I am even more interested in future KLayout versions :-)
(Quote)
Looks like our philosophies are different with regards to the PCell interface :-) ...I guess I was hoping that this would be up for discu…
Hi Matthias,
That is unfortunate. Since we use KLayout in edit mode at least 99% of the time, I cannot rely on functionality which only works in viewer mode.
Therefore I am looking for a possible workaround. Since the shapes of a PCell variant are…
Hi Matthias.
(Quote)
Ah, I didn't realise that :-) ...I'm glad we're on the same page now.
(Quote)
I find that surprising. I thought currently the parameter updates through the GUI are caused only by the event of the Apply or Ok buttons? What you …