It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Sir,
I have many GDSII file in folder \bumping.
as below , I want to check all the top_cells (that is mix 2 type of GDS , single top cell and multi top cell)
and do something check in each single GDSII file.
but look like I can't do that as below picture shown what the error message , do you have other idea for that?
main_window = RBA::Application::instance.main_window
filepath="D:\\bumping\\"
file_list =Array.new()
dir=Dir.open(filepath)
while name=dir.read
if name.downcase.match(".gds") then
file_list << name
end
end
dir.close
layout = RBA::CellView::active.layout
run_process=1
file_list.sort.each do |current_gds_file_name|
cellview = main_window.create_layout(run_process.to_s, 1)
puts "It is reading ..... #{filepath}#{current_gds_file_name}"
cellview.read("#{filepath}#{current_gds_file_name}")
currentlayout = RBA::CellView::active.layout
topcells=currentlayout.top_cells
topnames =Array.new()
topcells.each do |xx|
topnames << xx.name
end
puts "****************************"
puts "it is GDSII filename : #{current_gds_file_name}"
puts "it is top cells : #{topnames}"
run_process+=1
end
#####################
Comments
Hi jiunnweiyeh
CellView object cannot load files directly, use
LayoutView
load_layout()
function instead.** LayoutView can be created without the existance of mainwindow
example as below:
Hi @jiunnweiyeh,
Here is another example of making the most of your original code.
With the main window, all layouts will show up.
If that is not required, RawrRanger's example is more lightweight and elegant, I think.
Outputs
Hi All,
Thanks very much for your help , I will try that code.
Hi All,
Can I close the GDSII file after opened ?
such as code below , (but it is not workable...)
Hi,
How about this?
@sekigawa
It is workable , Thanks. I will base on this code to building what mind.
Thanks.