Insert a cell instance and then find it in the layout?

I am trying to programmatically (in Python) fill an irregular shape with a rectangular array of cells . I create a CellInstArray and insert it into the parent cell. I then want to locate that instance and explode() it and delete some of its original elements if they are outside the boundary area. This basically works, but I have one challenge.

I can retrieve all the instances (of any kind) with cell.each_inst(). But I am having trouble getting the one specific instance I want. I thought I could loop through all the instances and compare their cell_inst to the original CellInstArray that I inserted. But the == comparison seems to not work sometimes.

Is there a better way to do this? I was hoping I could insert an instance and retain a pointer to it, so I can later perform some operation on it. But I cannot figure out how to do this through Python.

Any help would be appreciated.


  • The answer was starting me right in the face. The cell.insert() function returns the instance in addition to inserting it. So I can easily hold on to this reference.

  • Exactly :)

Sign In or Register to comment.