Hi Jared,
Ruby is not a compiler language which uses the linker to resolve the target of a call. "def" is a statement like every other statement. Ruby runs the script once and while execution the function call, the function is not defined…
Hi Lital,
here's some sketch. The basic issue is that after the clip, the cells are not necessarily aligned. You have to know how to align them.
# assume you have two clips in cell "CLIP1" and "CLIP2"# with cell objects clip1 a…
Hi,
well, having a width and spacing check would already be the very core of real DRC functionality. There is no such function (yet). You can mimic the effect with under/oversizing and XOR, i.e.
# minimum spacing check (distance d)l = ... # inputm…
Hi,
first of all, KLayout is not Calibre. So there is no INTERACT (yet).
You can however combine boolean and sizing operations into scripts using the tiny layer processing framework. You can find that framework in the "Useful Ruby Modules&quo…
Hi Jared,
the UI designer comes with the Qt package. On Linux it's easy to install - it usually comes with the qt developer tools package. On Windows it can be found inside the QtSDK. However right now it's not easy to find a download for the Qt 4 …
Hi Jared,
that is pretty much domain the of Qt library. Qt uses a layout system which automatically will arrange the objects.
There are numerous tutorials for Qt. The first one covering the layout system I found is http://www.digitalfanatics.org/pr…
Hi Jared,
thank you for the code. I was confused a little because I did not find the move_layer command you were mentioning.
But I guess I understand the intention.
To change the layer, you have several options. You're basically right that you ca…
Hallo,
you can load a shared object using the -p command line option. Such shared objects can register new functions inside KLayout. Many internal functions are implemented through interfaces that don't require recompilation. For example, it is pos…
Hi Jared,
Do you mean the length of the string?
That is
"abc".length # gives 3
Or do you mean the number of distinct characters?
That is
"abc".split(//).uniq.count # gives 3"aab".split(//).uniq.count # gives…
Hi Yaroslav,
well, you basically have much more choices. KLayout is open source, so you could create you own interfaces. It is also possible to write C++ plugins in the form of shared objects/DLL which interface directly with the core code. That wi…
Hi Jared,
Inside the script you basically create two layouts: one per "new" and another with "mw.create_layout". The second is empty and "new_top" is only valid in the context of the first one. I guess that is why the …
Hi,
if you want to display layout information as overlay over an existing layout, maybe you should consider writing a layout file from your data and displaying that in the same view than the original layout. That is by far the most efficient way an…
Hi Jared,
there is no one-line copy method for KLayout yet. One user found, that you can use the clip method for that purpose, if you specify a clip box larger than the cell's bounding box. A single-line copy method is on my TODO list yet.
In gene…
Hi Yaroslav,
is the XML file already in the format of KLayout's report database?
Then the solution is that:
lv = RBA::Application::instance.main_window.current_viewrdb_index = lv.create_rdb("database_name")rdb = lv.rdb(rdb_index)rdb.loa…
Hi Canny,
Name equivalence is only a weak indicator for content equivalence, so KLayout refuses to reuse cells just because their names are the same. That is at least true for the import function. This is a safety feature since exchanging cells wit…
Hi Jared,
A hole is actually a feature of a polygon, not an individual shape you can insert. You can insert a hole into a polygon, not a hole into a shapes collection, i.e.
hull_points = ... # array of RBA::Pointp = RBA::Polygon::new(hull_points)h…
Hi Jared,
basically this message means that there is no method variant (of several) which expects the arguments given in the call. You'll get this message for example on this line:
RBA::SimplePolygon::new("balbla")
because there are two…
Hello,
You're right. That functionality is missing currently. I'll take that as a suggestion for the next major release.
For separating single instances out of arrays there is the "make cell variant" function. In you case, that is not an…
Hi Canny,
that is basically easy. Here's the script core:
# The layer where to put the texts tolayer = RBA::LayerInfo::new(1, 0)# The file where to take the texts frominput_file = "texts.txt"lv = RBA::Application.instance.main_window.cur…
Hi Jared,
As a basis for this discussion, I am referring to the samples found here:
http://www.developer.nokia.com/Community/Wiki/How_to_take_input_from_user_using_QInputDialog_in_Qt
For the first example this is the C++ code:
bool ok = true;QSt…
Hi Vlad,
You should check whether you have the Qt development tools installed. Apparently there are only libraries present on your system. You'll probably need some package like "qt-devel".
If you already have installed the Qt tools on a…
Hallo,
below is some code that might serve as a starting point. To install that script, create a new macro in the Macro Development IDE ("Tools/Macro Development"). Paste the code below into the code window. You can assign some key shortc…
Hello,
could you be somewhat more specific?
Maybe you can explain what information you want to retrieve (i.e. what do you mean by "hierarchically"?) or what kind of functionality you look for (script/interactive etc.)
Matthias
Hi Lital,
you have many choices. For example you could read them from a configuration file, get them with an input dialog etc.
The easiest solution is to pass them in the command line, i.e.
c = $coordinates.split(",").collect { |c| c.to…
Hi Srinivasan,
which version of KLayout are you using?
I had to dig really deep into my source code repository to find that message. It has disappeared about 4 years ago. Versions more recent that this should be able to read your file.
Regards,
…
Hi Lital,
there is a introduction into script programming here. You'll need some introduction into the Ruby programming language as well. There is a lot out in the net, a good starting point may be Ruby in twenty minutes.
Regarding the second ques…
Hi Keith,
Regarding A.) there is no different coloring yet. But KLayout supports multiple extractions and displaying them (although not colored differently). Every time you extract a net it gets added to the list of extracted nets. You can delete t…
Hi,
the tool you are looking for is "strm2gdstxt", not "strm2txt".
"strm2txt" produces some other format used in KLayout's test suite (that's actually where the strm2xxx tools belong to currently).
Regards,
Matthias