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 …
Hi Matthias,
Thanks for the hint regarding the actual_radius, that got the Basic.CIRCLE working. Also good to know about the add_missing_layers method, I guess it is good practice to always call it at the end of a layout generating script?
Regards…
Hi Matthias,
Thank you so much for your comments on these items.
As Ruby 2 has definitely some advantages, I will keep using the Windows preview version for now. My only concern is that I wasn't able to install Ruby 2.x under Linux easily, but I t…
Hi Matthias!
I was just by accident looking over my original coerce_parameters_impl code again and found a bug which your implementation fixed: when changing the contacts, the old_contacts weren't updated. Using this
if contacts != old_contacts p…
Thinking a bit further about the third paragraph in my last post about having the parameters stored within PCellDeclaration instances:
That could also simplify (or entirely make obsolete) the coerce_parameters callback, along with the need to have …
Hi Matthias,
Thank you for your great support, I appreciate the time and effort you put into this and hope to be able to return something valuable to this community.
I do understand that by having two interdependent parameters, I am probably movin…
Ok, seems like I didn't try hard enough. This hybrid worked under 0.23.10:
point = RBA::QPoint.new(123, 456)LEFT_BUTTON = 1NO_MODIFIER = 0mouse_click = RBA::QMouseEvent.new( RBA::QEvent::MouseButtonPress, point, RBA::Qt_MouseButton::LeftButton, LEF…
Hi Dave,
This code actually works under Windows 7, using KLayout version 0.24-python-eval which uses Ruby 2.1.3 and Qt 4.8.2.
As far as I know, this was changed in the transition from 0.23 to 0.24. The 0.23 version seems to use integers as Qt flag…