It looks like you're new here. If you want to get involved, click one of these buttons!
I am currently building out a LEF extractor script that works pretty well per cell, I just need a little extra help to iterate over cells. I was wanting to make a list of standard cells that I could iterate over to write to one file all at once for all the cells that I want in a "library" view, but I haven't found a function yet that will let me call a cell view by name. I very likely just missed it, but is there a way to essentially call:
cv = RBA::LayoutView.current
raise "No active layout" if cv.nil?
cell = cv.cell("AND2_1X") # cell = cv.active_cellview.cell
instead of using the active_cellview function?
Thanks!
Comments
Hello,
Iteration is straightforward:
1) Iterate over all cells of a layout: layout.each_cell:
https://www.klayout.de/doc-qt5/code/class_Layout.html#method79
2) Iterate over all (called) cells inside a cell: cell.called_cells.each:
https://www.klayout.de/doc-qt5/code/class_Cell.html#method22
Cheers,
Tomas