Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
1 to 3 of 3
I have written a python script that loads a layout file and exports screenshots of certain cells within that layout file (see below). I use the "lay_view.max_hier()" command to see the full hierarchy.
Is there a way to display the bounding boxes of cells within the cell that I am exporting, as well as seeing the full hierarchy? If I change the hierarchy level, I can't see what's "inside" the cell. I have tried changing various settings and also opening the same layout in the same panel, but the hierarchy display levels seems to apply to all open layouts.
# layout file
file_str = r'C:\test_layout.oas'
# create directory for exported images
script_file = os.path.splitext(file_str)
export_folder = script_file + '_images'
# get main window object and load layout file
mw = pya.Application.instance().main_window()
cell_view = mw.load_layout(file_str, 0)
# get layout view and cell view object
lay_view = mw.current_view()
cell_view_ind = lay_view.active_cellview_index()
layout = cell_view.layout()
for c in layout.each_cell():
# only export images of cells whose name contains '_unit_cell'
if '_unit_cell' in c.name:
# set layout view to display cell
w = c.bbox().width()
h = c.bbox().height()
# get cell bounding box and set layout view
box = c.bbox()
new_box = pya.DBox(box.left/1000, box.bottom/1000, box.right/2000, box.top/1000)
# export image
res = 2000
image_file = export_folder + '\\' + c.name + '.png'
lay_view.save_image(image_file, res, 8*int(res*(h/w)))
there is one option: add a pseudo-layer to the layer list with the following "layer source":
Configure this layer with empty stipple and the color you want your cell frame to appear. This will paint a cell frame box plus a label with the cell name, regardless of what hierarchy level you have picked. However, you will always see the label currently. It cannot be disabled.
Another option is to create a box-type ruler with the cell's bounding box. You can configure this ruler to show a plain line and no labels. Then the ruler acts as a plain box marker. It will be shown in the image too.