It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I want to draw a path within my current cell with the selected layer.
Later, I will make calculation on the path points, so I need a ruby script.
First I need to know how to draw the path and my script does not work :
include RBA
app = RBA::Application.instance
mw = app.main_window
view = mw.current_view
cv = view.cellview(view.active_cellview_index)
pts = [RBA::Point.new(0,0),RBA::Point.new(0,20),RBA::Point.new(20,20)]
wdt = 10
cv.cell.shapes(0).insert(Path.new(pts,wdt))
Thank you,
OkGuy
Comments
Your script does work for me, but you have to zoom far in. Because your line is 20 nanometers not 20 microns as I assume you meant. You have to divide by the database unit. Personally I think of all the numbers in microns and do all the calculations in microns until the step where they become a real object (like a Point, Path, etc), and at that time I divide by dbu.
That plus a few other fixes below.
Thank you, it works fine, except that it uses the layer 1/0. But I can fix it.
OkGuy