Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Save visible layers with PCells

I tried saving my layout layers into different files. I tried several different approach. For example, I hid unwanted layers, and in "save as" dialog for OASIS I chose to save visible layers only and not to save PCell information.

However, then I opened the new file, other layers were still there. Even if I deleted them from before saveing the file. Also, the result was the same with GDS. I was a bit confused.

Then I tried converting all PCells to static using the function Edit->Layer menu. Now, the saved file only had the visible layers.

This might be a bug or just a confusing use case. Anyway, I thought I should report it.

Could you please give some tips, how to easily save layers into different files in a script? Should I again first convert to static? How to do that in a script?

Thanks!

Comments

  • Hi,

    I tried to reproduce the issue, but I cannot fully confirm your observations.

    What I see is (0.25.8):

    • when I unselect "write PCell information" and only write "visible layers", only these layers will appear in the file.
    • when I select "write PCell information" and only write "visible layers", the file actually does not contain the hidden layers (confirmed by a GDS dump), but when you load it again, the PCell code is executed again and the original PCell layout is restored. This is an intended behaviour.

    Or in other words: the problem does not seem to be saving, the problem seems loading.

    So in my case, saving "visible layers" and "without PCell information" should do the job.

    With a script you do it like this:

    ly = ... # your layout
    
    # create an options object
    opt = RBA::SaveLayoutOptions::new
    # don't write PCell information
    opt.write_context_info = false
    # write layer 1/0:
    layer_to_write = RBA::LayerInfo::new(1, 0)
    # select only this layer
    opt.add_layer(ly.layer(layer_to_write), layer_to_write)
    
    ly.write("/home/matthias/x_script.gds", opt)
    

    Matthias

Sign In or Register to comment.