Simple question about selecting objects of a specific layer


I am brand new to Klayout. I'm working in a cell that has shapes in different layers. I would like to only select the shapes made on a specific layer so that I can copy them to a different cell. Is this possible while using the selection box or do I have to manually select each shape? It would be very time consuming to select each shape individually, so I hope there is a faster way of doing this.


  • Use the layer window "valid" filter - make all invalid,
    then make valid the one you want, then you can use
    "all" or "area" select.

    You can also decide whether you want to do this at
    the present level, or deeper. How that would play out,
    maybe turning hierarchy into a flat single layer layout,
    I haven't played around to see.

  • Thank you for the quick response. I'm still having some trouble. I notice that this approach of selecting objects in a specific layer works for "normal" objects like rectangles polygons etc. but this does not work for P-cell shapes such as the donut shape. Even if I make layers invalid, I can still select these P-cell objects. My layout consists mainly of these donut shapes. Is there a way for it to work with these P-cell shapes?

  • PCells (I believe) display "results of an evaluation" and
    are not polygons - unless you flatten those instances to
    "freeze" their evaulation.

    Might want to copy the present layout to some sandbox
    and flatten all levels, if there's too much hierarchy to deal
    with. Then use layer filtering.

  • Ah I see. Ill do that then. Thank you again.

  • Thanks @dick_freebird, that's exactly the point :)

    Instead of flattening, you can also use Edit/Selection/Convert to Static cell. Then you'll get a normal cell and you can copy/paste as you like. Of course then you can no longer change PCell parameters and the cell will not update dynamically.


Sign In or Register to comment.