Equivalent of Deep Copy in Python Macro Design

Hi Matthias,

What is the proper way of copying a cell so that it does not share the same instance with the other one?

Thank you.


  • Hi,

    The method is "Cell#copy_tree":

    ly = ... # a pya.Layout
    new_cell = ly.create_cell("NEW_CELL")

    This will create a copy of "ORIGINAL_CELL" in "NEW_CELL" with all the subcells duplicated.


  • Thanks Matthias. It worked well!

Sign In or Register to comment.