davidnhutch

About

Username
davidnhutch
Joined
Visits
1
Last Active
Roles
Member

Comments

  • Alex, Matthias probably has some good idea to help solve your problem, but in case it helps: There isn't really a straightforward way to 'select' and then act on selected objects via RBA. I struggled with this idea too when I started, because I wa…
  • Pasting Matthias's code with a few modifications below: (Note: this modified version is also found in E4K inside E4K > Examples menu > Qt > Screenshot) ## Qt and screenshot.lym## By Matthias, http://www.klayout.de/rba_examples.html## ## E…
  • Hi again, I made a major change to TRT. I decided TRT was 'confused'. Partly it was for useful scripts and partly for learning to code. So I separated the two. * "The Red Toolbox" (TRT version 0.3.0) now holds only scripts that might b…
  • Huh, I didn't realize annotations were saved in the session. Thanks. Also the code works great, thanks! Yes a tad ugly, but functional. I'm sure RBA can handle this with some syntactic sugar in some future version...
  • Not disappointed at all, that's great! It was a good coding exercise :)
  • Not sure what 'calibre drc can make extend' means -- I assume that means calibre drc can find the extents of a polygon and then find the center of that extent. By 'extent' I assume you mean bounding box. Let me know if I misunderstood that. Probabl…
  • I am not familiar with calibre DRC but I'll attempt.. Your first question: "I need to make small dot polygon(1nmX1nm) on the center of polygon... I know there is such function in calibre DRC as option of extent command." I'm not sure wha…
  • All, An "Apply to all" function was useful enough to me that I coded up one in Ruby. Download TRT v0.2.2 and look in Selection > Apply to all. (If you already downloaded 0.2.0, there are 13 new scripts and several improvements since t…
  • I see. Too bad, but it makes sense. It is true, PCell will be the same. However I often use the origin of the cell as some kind of mental reference point -- e.g. the "+" is snapped to some relevant grid, or aligned to some other shape whe…
  • Chris, good example, and you are right about my code modifying every QTW object. Dave, your original post said "My original goal was to have a Tab character move down the one and only editable column in a table I have created." Actually I…
  • Try 0x01000001 in place of Qt::Key_Tab, which is the actual hex value that should be inside Key_Tab (link). If that doesn't work, can you post a runnable script? i.e. a script where you invoke KeyPressEater. That will help debug. David
  • Not sure what you mean. You can override any method in Ruby. Chris overrides it when he does class MyTableWidget < QTableWidget def keyPressEvent(event) puts "keyPressEvent(#{event})" endend MyTableWidget is a child of QTableWid…
  • To format code, choose Markdown radio button and indent each line by at least four spaces This line has four spaces in front of it This line has six spaces This line has eight spaces To do that easily, select all code in KLayout's macro editor…
  • Shameless plug: Download The Red Toolbox, unzip it into your C:\Users\username\KLayout\macros folder (or equivalent on Linux), restart KLayout, select box, run The Red Toolbox menu > Selection > Rotate by angle (individually). Note that the re…
  • Nice work Chris, your script works well. I know you were talking to the other Dave but I'll just mention to him or others: Make sure Tab key is not already in use, otherwise KLayout receives the key event rather than the table widget. It may be po…
  • Can you post a minimal example? Then maybe I or someone can help get it working. David
  • RBA::QTableWidget.keyPressEvent is inherited from an ancestor class QWidget. In the official Qt docs, go to QTableWidget, scroll down to "220 public functions inherited from QWidget" and click QWidget. Not all of the inherited methods show…
  • Files are set up via git. I'm new to git so am not sure if I have to add you as developer (can't see how to) but anyway just email me if you can't push to it. My gmail address is david.n.hutch https://sourceforge.net/projects/theredtoolbox/code Da…
  • Ah I see the reason now. I suppose what you suggested of using the macro name and then appending a number if there's a name clash would be nice. But, it still requires the person coding to run get_slug(path,title) to get the actual name, in case the…
  • Thanks Matthias, Yea sorry, I haven't set that up yet. Right now it's just a zipped file I uploaded. I will do so some time soon, I just haven't got git set up on my home computer. Very happy if you or others contribute. Just add a line to Core &g…
  • Hah. Never mind. I answered my own question with the previous edit. It is of course possible to look up the slug if you have the description. def get_slug(path,title) menu = RBA::Application.instance.main_window.menu items = menu.items(path) slu…
  • Quick note for future readers: I found I needed something like this: mapping['edit_menu.cancel'] = "'F12'" instead of this: mapping['edit_menu.cancel'] = 'F12' Otherwise, it indeed wrote to the klayoutrc file, but it got confused on s…
  • Thanks Matthias for the tip about has_tool_entry. Thanks also for your other comments. I do still see the problems I mention if I run the plugin after a layoutview already exists. If I run it before a layoutview exists, it is fine. In that sense th…
  • Matthias, Sorry to keep beating a dead horse :-) But I think I found another instance of "what should not be selectable" that I wanted to report. Steps to reproduce the problem: * Open KL 0.24-python-eval on Win 8.1 * New layout named &…
  • Huh, never mind, it seems to be solved by just making it "Run early on startup" -- i.e. run before any layout views are created. If I get a working final "settings display" script, I'll post it here. Thanks Matthias David
  • You are correct, thanks. Moving the engine = DRC::DRCEngine.new initializer inside the .clicked method worked great. Thanks!
  • Thanks Matthias, Yes your secret is safe with me. :) Well this is a nice feature! But it seems to be messing with either other plugins or configuration settings. When I run it, various things get disabled, for example * The background I usually h…
  • I realized a second problem. If you change the setting in the usual manner (eg. F3 > Select top level objects) then the toggling function of the above code gets out of sync. Basically it lacks a way to respond to the user setting the "true&…
  • Hi Matthias, Having a small problem with using DRC::DRCEngine::new. I have a simple DRC script, let's say ((input(1)|input(2)) & input(3)).sized(3.um).output(4) Each time I run it in DRC tab in Macro Editor it clears layer 4 and then outputs …
  • Aha. I knew there had got to be a good reason. Thanks Matthias Davivd