It looks like you're new here. If you want to get involved, click one of these buttons!
Hi folks,
Is there a function that gets every object/instance in a layout hierarchically ?
Pls note: i dont want CellView:Layout.each_cell(). I think i need the instance objects
But it would be nice to know how the similar function that must already exist, in its graphical form within the Cells Panel. Is that functional behind the panel exposed ?
Comments
https://www.klayout.de/forum/discussion/comment/10212#Comment_10212
This thread is useful, but also doesn't provide the instance object.
Hello,
What you need is: begin_instances_rec
https://www.klayout.de/doc-qt5/code/class_Cell.html#method11
Cheers,
Tomas
Hi Tomas,
Thanks for your input and patience to my belated response.
I believe i wrote this post incorrectly. What i meant to say is access all objects not instances that in klayout refers to cells.
I can access all instances (ie cells) with either layout.each_cell() or layout.top_cell().each_inst() fine. But these do NOT return shapes.
Is there a function from a Layout Class or Cell Class that would returns all shape objects ?
Best,
Faisal
HI Faisal
begin_shapes_rec
returns all the shapes undercell
, which requires a layer index as a parameterthis layer index can be aquired by iterate through
layer_infos
.the
begin_shapes_rec
returns a recursive shape iter that holds shape, trans and hierarchical info.Example layout
the result of this layout is :