How to get a text list of layers in a cell

The Layers menu will show you what's used in a cell, by BOLD face
on the used layers of the larger set.

I would like to get the same info in a copy/paste-able text for use in documentation, but I haven't found any such utility. Klayout obviously is keeping track; how to make it say, rather than show?


  • Nothing can't be done with a script :)

    ly =
    cell =
    layers = ly.layer_indexes.collect { |li| info = ly.get_info(li); [ info.layer, info.datatype, li ] }.sort
    puts "Non-empty layers of cell #{} (including subcells):"
    layers.each do |layer,datatype,li|
      if ! cell.bbox_per_layer(li).empty?
        puts "  #{layer}/#{datatype}"

    (Create a new macro in the IDE under "Ruby", paste this code and run it. The printout gives the BOLD layers of the currently selected cell.


Sign In or Register to comment.