It looks like you're new here. If you want to get involved, click one of these buttons!
So I am using the following code I came up with the import GDS files,
it uses a GUI to select the files ..
All works well the first time ,
but when you run the script again ,
to select new cells .
it loads the previous cells as well.
issue seems to be with the tc = layout.top_cells()
for cell in gdsFiles: layout.read(cell) tc = layout.top_cells() for cell in tc: #we don't want to insert the topcell itself if (cell.name != "TOP"): print('New Cell generated: '+cell.name+' in Hierarchy '+topcell.name) trans = pya.CplxTrans( 1.0, ang, flip, x, y) new_instance=pya.CellInstArray.new(cell.cell_index(),trans) print(trans) layout.cell(top_cell_idx).insert(new_instance) x = x + step