How to select all the instances of a cell by name

edited April 2024 in General

I want to select all the instances of a specific cell and create a new cell from that selection but I can not figure how to achive that.
I have tried to use the search and replace tool to select the cells by name but the selection result is not translated to the current layout.
I have tried selecting all the cells instances in the current cell by area selection, but I do not know (if posible) how to remove specific cells from the selection.
You can select cells in the "Objects Properties" Window, but you can do nothing with that selection. There is no contextual (rigth-click) menu options with the selected objects like copy, move, delete, save to cell, .... Maybe that option could be implemented

Any ideas?

Comments

  • I don't have a simple solution to this problem.

    That is a feature for the future, for example by sending the results of a "Search" query to the selection.

    Matthias

  • Thanks you Matthias for you quick answer. I think that the solution of sending the results to the selection could be the best of all to be implemented in the futur. I think it is the most simple and powerfull but may be is difficult to implement.

  • Hello,

    Actually, this small script from Matthias will do fine:

    https://www.klayout.de/forum/discussion/comment/7228/#Comment_7228

    If you don't want it to be hierarchical, you can comment out the else part of the if statement.

    A select option in the find tab of the search and replace feature would be really sweet though :-)

    Cheers,

    Tomas

  • I have created a ticket to implement the original idea of "send query results to selection": https://github.com/KLayout/klayout/issues/1721

    There are so many use cases, it is worth adding this feature.

    Matthias

  • Thank you very much for adding that feature to KLayout. I have tested it and it works perfect!
    It was a little dificult for me to find the correct way to achive that.

    Edit > Search and Replace > Find > Object (Instance) > Instance cell name (MyCell) > Find > Export > To selection

    Angel

  • Very good, thanks for letting me know!

    I provided a comment in the issue tracker (https://github.com/KLayout/klayout/issues/1721), maybe that will help others to find it too :)

    Thanks,

    Matthias

Sign In or Register to comment.