How to select instances in the active cellview by using Ruby ?

edited February 2014 in Ruby Scripting
Hi All,
How to select instances in the active cellview
by using Ruby ?
For example, I would like to select all instances
whose cellname is "BGAP_SMALL_AMP".
How to do that by using Ruby script ?


Best Regards,
Marben

Comments

  • edited February 2014

    Hi Marben,

    What do you mean by "select"?

    The "selection" inside the view is not something you can control through Ruby currently. You can read and clear the selection but not select certain objects.

    If you plan to manipulate those instances, Ruby is an option. In that case you could traverse the layout looking for those instances and code some manipulations inside your script.

    Another way to apply manipulations (for example, delete or replace such instances) without using Ruby scripts is the "Search and Replace" feature. See http://klayout.de/doc/manual/search_replace.html for details about that.

    Matthias

  • edited November -1
    Hi Matthias,
    Thanks for your reply .
    I mean by "select", just like pressing
    the left mouse button, then drag a rectangle
    around the instance, then the instance will be
    highlighted. Because if I want to find the location
    of all the instances "BGAP_SMALL_AMP" in the cellview,
    it is difficult to select or search them one by one .


    Best Regards,
    Marben
  • edited February 2014

    Hi Marben,

    well, that is the selection that is not accessible through Ruby - maybe it will in future versions, but I can't promise.

    You can manipulate objects though. But that depends on what you want to do with the selection.

    Matthias

Sign In or Register to comment.