It looks like you're new here. If you want to get involved, click one of these buttons!
I am trying to take a screen shot of a design. I want to be able to do this from the command line without a view open.
This code below works but requires a view to be open in the main window.
module MyMacro
include RBA
w = 5000
h = 5000
f = "C:\\TEMP\\test.png"
view = Application::instance.main_window.current_view
view || raise("No view open")
view.save_image(f, w, h)
end
How do I open a .gds file into a LayoutView so I can use .save_image . This is the code I tried but would get the error 'Object cannot be created here in LayoutView::load_layout'.
module MyMacro
include RBA
w = 5000
h = 5000
f = "C:\\TEMP\\test.png"
layoutView = RBA::LayoutView::new
layoutView.load_layout("C:\\TEMP\\test.gds",TRUE)
layoutView.save_imabe(f,w,h)
end
Thanks,
Keil
Comments
Hi Keil,
RBA::LayoutView
is not an object you can instantiate yourself. I can only live in the context of the application. You you have to useYou can configure the view by loading layer properties or similar. You can run the script with "-z", but not with "-zz" since the latter mode does not create a main window object.
Matthias
NOTE: code was edited (see below)
Hi matthias
what your doing is awesome.
I am having problems run the code you provided. Is open_layout a valid method because when I run your code I get and error message "undefined method `open_layout' for #". Also when I look at the documentation for main_window I dont see a method called 'open_layout'.
Code I tried to run.
Thanks,
Keil
Hi Keil,
Sorry for the typo. It should be 'load_layout(..., 1)'. The 1 is for 'open in a new view'.
I have edited the above code.
Matthias