Top Level Text

This may have been answered before but searching through the fourms I only find si = cell.begin_shapes_rec(ly.layer(lay)) , So gonna ask
I would just like to get top level Text locations only along with the layer and and datatype, not a recursive search

Comments

  • the recursion is great would be helpful to be able too add the depth ie:0-32

  • Hi,

    if you just use

    for s in cell.each_shape(layer, pya.STexts):
       ...
    

    you will get only the texts from this cell, not from the child cells.

    You can limit the recursion depth of a RecursiveShapeIterator using "max_depth=...". A zero depth with only give you the shapes from the initial cell, 1 will deliver the shapes from the first child cell level too:

    si = cell.begin_shapes_rec(ly.layer(lay))
    si.max_depth = 32
    ...
    

    Matthias

Sign In or Register to comment.