Invisible cell?

edited May 2017 in Python scripting

Hi everyone,

I'm trying to clean up my cell view a little bit and came across a problem I didn't think about before.

I usually start my layout by designing one cell by inserting multiple different shapes.
This cell and also the top_cell is created by calling the 'create_cell()' method of the layout object:

top_cell = layout.create_cell("Top")
cell1 = layout.create_cell("Cell1")

After this one cell is finished I create CellInstArrays containing hundreds of references to this cell.

cellArray = pya.CellInstArray(cell1.cell_index(), pya.CplxTrans(1,rot,False,x0,y0), pya.Point(dX,0), pya.Point(0,dY), nX, nY)

This CellInstArray is then inserted into my top_cell which gives me a nice hierarchical order I am looking for.

top_cell.insert(cellArray.transformed(pya.CplxTrans(1, rot, mir, pya.DPoint(x0,y0))))

However, that one cell at the beginning (cell1) is still located in the top level next to the top_cell.
When I delete it, all the references in the CellInstArray are also deleted.

I tried to create a new cell by just calling the constructor of the Cell class and take that as my "cell1", but this didn't work for me (should it work?).
And I tried the same thing with an additional layout object which didn't work either.

My question is, is there a possibility to make cells "invisible" for the hierarchy view? Or do you know a better solution for my problem?

Thanks in advance and best regards
Daniel

Comments

  • edited November -1

    Hi Daniel,

    maybe by chance you have selected "Flat cell view" in the cell list? Please right click on the cell list an check whether this option is selected.

    Matthias

  • edited November -1

    Hi Matthias,

    thanks for the reply.
    The "Flat cell view" option is disabled and the top_cell shows the hierarchical order I am aiming for.
    If I flatten the cells, the cell view list gets huge (>100 entries) in contrast to 20 cells if I disabled the flatten view.

    Daniel

  • edited November -1

    Hi Daniel,

    I'm still trying to understand what you need. There is no way to make a cell "invisible" for the hierarchy tree. The tree depicts the relationship, so tweaking it does not look like a good idea.

    If you see "top_cell" and a "Cell1" below the "top_cell" everyhing works as it should. "Cell1" then is a child cell of "top_cell".

    If I knew what your problem really is I could propose a solution.

    Matthias

  • edited November -1

    Hi Matthias,

    sorry if my question was unclear.
    My hierarchy created by my code above looks like this:

    • top_cell

      • CellInstArray_of_Cell1
    • Cell1

    and cell1 is the cell I want to get rid of (leaving the CellInstArray filled).

    Daniel

  • edited June 2017

    Hi Daniel,

    that can't be correct. If you really produce a correct instance of Cell1 then the hierarchy will be

    top_cell
      -> Cell1 
    

    and nothing else. So I think there is something wrong with the code.

    Please paste a complete sample (reduced one if you want) which demonstrates the issue. I don't want to guess what's going on.

    Matthias

Sign In or Register to comment.