How to insert Box in the current layout ?

edited January 2014 in Ruby Scripting
Hi All,
I am new in Ruby scripting, and I am very
interested to learn Ruby.
I would like to ask, How to insert Box in the current open layout, cell without creating another layout ?
Thanks in advance .

Best Regards,
Marbs

Comments

  • edited February 2014

    Hi Marbs,

    here's a sample code

    cv = RBA::CellView::active
    cv.cell.shapes(cv.layout.layer(104, 0)).insert(RBA::Box::new(0, 0, 100000, 150000))
    

    This code requires KLayout >= 0.23 (previous versions did not have the convenience methods used herein).

    It will insert a box with a lower-left coordinate of 0,0 and upper-right coordinate of 100000,150000 (database units) into a layer with GDS layer number 104 and datatype 0. The cell will be the active cell in the currently active view.

    Please note that a layer with that layer number and datatype number should already exists.

    If you need some tutorial about Ruby itself, there are numerous very good books and online tutorials. Just google for it.

    Matthias

  • edited November -1
    Hi Matthias,
    It works.
    Thank you very much for your reply.


    Best Regards,
    Marbs
Sign In or Register to comment.