Calculate the number of boxes

edited March 2018 in Ruby Scripting
Hi Matthias,

I have a lot of boxes (and only boxes) in my layer (101,3) and I would like to know if it is possible to calculate the number of those boxes ?

Thanks in advance for your reply.
Eric.

Comments

  • edited November -1

    TRT > Selection > Analyze selection

    This spits out number of boxes

  • edited November -1
    Thank you David. Very nice tool. That run perfectly.
    But in my program, I do not want user intervention (for the selection of boxes). So, do you know if there is a way to select these boxes by program ?

    Thanks.
    Eric
  • edited November -1

    Hi Eric,

    apart from David's pretty solution, there is a DRC one-liner to print the number of boxes:

    puts input(l,d).raw.rectangles.data.size
    

    Replace "l,d" by the GDS layer/datatype number of the layer you want to have analyzed.

    Regards,

    Matthias

  • edited November -1
    Hi Matthias,

    thanks a lot. That's exactly what I wanted.

    Regards
    Eric
Sign In or Register to comment.