@Matthias,
I think (hope :-) Lukas was saying "we need to make [his SiEPIC PDK] work for both 2 and 3" rather than we need to make core KL work such that its scripts work for both 2 and 3. So, neither he nor I am asking that of you.. whic…
Thanks Lukas,
You missed a few print commands - for example lines 73 and 79 in SiEPIC_EBeam_Path_to_Waveguide.lym
After fixing that and running that .lym file while a path is selected, it says:
Caught the following exception: 'pya._Iterator' obje…
Lukas,
Your github code looks great. However I am having trouble running it. Two questions: (I am new to Python, these are probably simple.)
1) I notice from your video you are using the same KL version as me (0.24.3). (I am running Windows howeve…
Under your KLayout home directory there is a folder called libraries. Amy gds or oas file in that folder is read, and becomes a static library. The cells available in the static library are simply the cells in that layout. To insert a static library…
You'll find it when you press F3.
There are three ways to edit shapes that are not on the top level:
* Descend
* Right click on the cell name in the hierarchy on the left, and Show As New Top
* F3, uncheck Select Top Only
Each has benefits. For …
Pasting from E4K's "Draw a box, with undo.lym". You'll have to translate to python.
## Draw a box, with undo.lym## By davidnhutch## ## Same as Draw a box.lym, but condenses the code and wraps it in something that allows the user to do Edi…
Lukas,
... though in such a case as Matthias describes, the "follower" and "followee" both have to be inside the same PCell, which may not be what you are ideally looking for. I presume you want to move some component (let's say…
Sorry to butt in, but it's possible lukasc is talking about selecting a child instance in the layout and choosing Edit > Selection > Flatten cell > All hierarchy levels. This flattens the entire instance. lukasc, is that correct?
The behav…
Haha sorry for confusion. I didn't not ever not mean to not confuse you. (Kidding.)
[EDITED]
Well, apparently there is no problem any more. I can't reproduce it, and am not sure if the problem was my misunderstanding of the settings or a real (tra…
Yes there is no initializer for ICplxTrans as the 2nd argument of CellInstArray -- just one for Trans as the 2nd argument, or for CplxTrans as the 2nd argument. Docs
Can you use CplxTrans instead? Usage should be similar.
David
Nice work, it's a good example. I rarely run from command line, so E4K was lacking any examples of this. I just added it, attributed to you of course. I hope this is okay but I presume it is since you've already posted the script publicly here on th…
Weird, I can reproduce it with Basic.CIRCLE.
Here are my steps:
* Open KL 0.24.3 on Win 10
* File > New layout
* Edit > Layer > New layer > 1/0
* Insert Basic.CIRCLE
* Press "*" to show entire hierarchy
* Ensure File > Set…
tyanata,
Weird - it works for me, when I paste all that XML in to a new text file and save as Something.lym, then restart KLayout and attempt to open a .lyp file.
I of course replaced
C:\\data\\klayout
with
C:\\Users\\David\\KLayout
but indee…
Nick,
Here's a script that draws a circle (path). Modify these lines
x = radius * Math.cos(tt)y = radius * Math.sin(tt)
to instead have the parametric equation for log spiral.
I've put this in E4K.
It looks like I spent a huge amount of time wr…
Download TRT, install it, and look in TRT > File actions > Batch convert file types.
You will probably want to pull out just the code you need to make your own custom .rb file, and also read up on how to run from command line
Please post you…
You need to use CplxTrans or ICplxTrans class instead. Trans only supports those four rotations.
Why? My guess is the reasoning is this. Trans will always map a polygon on to a polygon, perfectly snapped to the grid, without changing any of the ver…
Actually Matthias recently added this feature. You must be using an older version of KLayout, or else don't know where to find it in File > Setup > Application > Selection > PCell content is selectable. In this case, you don't have to &q…
You are right, if you want "find and replace" characteristics then this will not work. Not sure exactly how to do that without writing a quite complicated custom script.
Perhaps the simplest quick fix, though this is a bit 'hacky':
You c…
Oh... haha never mind. I can just do it as a 1x2 array.
I wasn't thinking about it as an array because these two PCells can show up anywhere on the layout, not necessarily in the same xy relative locations, but indeed it solves the problem.
David
Also check out E4K, which, funnily enough, has an example to draw a box on a new layer.
Feel free to contribute your own example scripts to E4K as you learn scripting -- E4K is a bit sparse right now... I just haven't had the time to add a huge num…
Add this near the end:
layout_view.add_missing_layers
This is equivalent to right-clicking on the layer list and choosing "Add other layer entries" (try it, with your current script).
Why do you need to do this? The layers list does not…
I have not observed the problem (I have the same setup).
Can you give a little more information? What happens when you try -- do you get an error message or does just nothing happen? Did you try uninstalling and reinstalling? Did you try anything e…
The easiest way I think is to use "PCell array generator.lym", which is part of TRT. Once you've installed TRT per the instructions at that link, reopen KLayout. Open a new layout. Click the menu at the top and then Cells > PCell array.…
Sure there is, via Ruby/Python script and possibly via the 'rename cells' function, depending on what you are trying to do.
Can you give some more details about how you want to assign the number, or what you want to assign the number to. For exampl…
Check out these links for examples for how to have PCells call other PCells
* http://klayout.de/forum/comments.php?DiscussionID=637
* http://klayout.de/forum/comments.php?DiscussionID=404&Focus=2806#Item_7
* http://klayout.de/forum/comments.php…