It looks like you're new here. If you want to get involved, click one of these buttons!
I am trying to make a simple "multi clip" script that takes a list of boxes and clips a layout file similar to how this tool works:
edit->utilities->Clip Tool->multi clip
I found a few discussions that are close to showing how to do this:
I think it would be something very simple like this, but the output.oas file is empty
import pya layout_file = "C:/~/input.oas" layout = pya.Layout.new() layout.read(layout_file) top_cell = layout.cell('my_top_cell_name') bblist = [ # Left, Right, Bottom, Top pya.Box.new(0, 1000, 0, 1000), pya.Box.new(1001, 2000, 1001, 2000) ] clip_layout = pya.Layout.new() clip_layout.dbu=layout.dbu for layer_id in layout.layer_indexes(): clip_layout.insert_layer_at(layer_id, layout.get_info(layer_id)) clip_cells = layout.multi_clip_into(top_cell.cell_index(), clip_layout, bblist) clip_layout.write("C:/~/output.oas")