Producing a png image of a certain region in the layout using python.

Hello I am a new member, so sorry if I unintentionally violate any discussion rules.

I am trying to produce a png image of a certain region in the layout using python.
1-I need to read the .oas file,
2-Define the region of interest,
3-Create a png image of that region.

I searched through other discussions (https://www.klayout.de/forum/discussion/327/goto-position-and-snapshot)
and I think I can do it by using

include RBA
app = Application.instance
mw = app.main_window
lv = mw.current_view

lv.save_image("image_file.png", 640, 480)

However, when I try to run this on python IDE in Klayout, I receive an error for "include RBA" as an undefined method.
I also tried it on Ruby IDE.

Could you please help me to write a script that will produce a png image of a certain region in the layout using python.

Thanks in advance!
Kind regards.

Comments

Sign In or Register to comment.