It looks like you're new here. If you want to get involved, click one of these buttons!
I have a gds library file in the usual location (KLayout home folder > libraries) and I can add components from it via the GUI just fine.
Now I make a new layout with one cell called "TOP", and I try to add one of the same library components via Ruby. This script causes KLayout to crash with no error explanation. Note however that if I comment out the last line that it does not crash (but, while it imports the cell it does not instance it on the existing "TOP" cell, because that was the point of the final line).
# Inserts a static cell instance from a standard library
include RBA
layout_view = Application.instance.main_window.current_view
layout = layout_view.active_cellview.layout
dbu = layout.dbu
out_cell = layout_view.active_cellview.cell
lib = Library.library_by_name('LIB')
lib_cell_index = lib.layout.cell_by_name('TEST')
layout.add_lib_cell(lib,lib_cell_index)
cia = CellInstArray.new(lib_cell_index,Trans.new(-100/dbu,0/dbu))
inst = out_cell.insert(cia)
Any ideas?
Thanks,
David
Comments
Ah! Never mind. I had the same problem I had in a previous post (though I thought I had fixed it).
Anyway here is the solution: