using klayout python interface interactively on an open layout

Is it presently possible to use the console of the the python development window to interactively execute python commands and on a design in an open window? That feature would really help in code development.... that how I used to use skill on layouts....

Comments

  • edited October 2020

    Sure you can do this. It's just not a single liner.

    Here is how you can create a rectangle with lower left corner at 0,0 and width of 0.5 and height of 1 micrometers on layer 7/0 in the current cell:

    > cell = pya.CellView.active().cell
    > layer7 = cell.layout().layer(7, 0)
    > cell.shapes(layer7).insert(pya.DBox(0, 0, 0.5, 1.0))
    

    Matthias

Sign In or Register to comment.