Opening a subcell

Hi,
What would be the easiest way to open klayout and directly display a specific subcell from command line ?
Many thanks for you help.

Comments

  • Hello,

    you can achieve this through a script:

    Save this to "show.rb":

    RBA::Application::instance.main_window.load_layout($layout, 1)
    cv = RBA::CellView::active
    cv.cell = cv.layout.cell($cell)
    

    And run KLayout this way:

    klayout -rm show.rb -rd layout=path_to_layout -rd cell=cell_name
    

    There currently is no option on the command line to specify the cell name to show initially. But that's a nice suggestion.

    Matthias

  • Hi,

    Thank you for your answer... but unfortunately I get an error:

    Cannot call non-const method on a const reference in CellView::cell=
    show.rb:3:in cell=' show.rb:3:in

    '

    I use
    KLayout 0.24.7

    on
    OSX 10.11.6

    Philippe

  • Hi,

    I tried on RHEL6 and it works fine. It may comes from a compatibility issue with the native ruby version. I will check it.

  • Hi,

    that's because 0.24.7 is a bit outdated. The script above requires a 0.25.x version.

    A compatible version of the script is:

    RBA::Application::instance.main_window.load_layout($layout, 1)
    lv = RBA::LayoutView::current
    cv = RBA::CellView::active
    lv.select_cell(cv.layout.cell($cell).cell_index, cv.index)
    

    Matthias

Sign In or Register to comment.