The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 23rd, 2024, 8:10am
Pages: 1
Send Topic Print
Get Layout Objects in  hierarchical view with skill (Read 3116 times)
Berti
Community Fellow
*****
Offline



Posts: 356

Get Layout Objects in  hierarchical view with skill
Aug 10th, 2009, 2:12am
 
Hi all,

I got a hierarchical layout, where I need to adjust the sizes of the vias. For this purpose I started writing a skill script using the following commands:

Code:
cv=geGetEditCellView()
l_rect=setof(shape cv~>shapes shape~>objType=="rect")
 



Unfortunately this only select the rectangles in the top view, but doesn't go down in the hierarchy. How can I get all the rectangles (vias) in a hierarchical view?

Thanks for advices, Cheers
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Get Layout Objects in  hierarchical view with skill
Reply #1 - Aug 15th, 2009, 6:59am
 
You'll typically need to do some kind of recursive traversal of the instances (if you need to visit every instance) or instanceMasters (if going to each master once is sufficient). Assuming you want to visit just each master once, something like:

Code:
procedure(EXtraverseHierarchy(cellView @optional (doneSoFar makeTable('visited nil)))
  let((rects)  
   foreach(master cellView~>instanceMasters
      unless(doneSoFar[master]
        doneSoFar[master]=t
        EXtraverseHierarchy(master doneSoFar)
      )
   )
   rects=setof(shape cv~>shapes shape~>objType=="rect")
   ; do whatever you were going to do with the rects
 )
)
 



Sorry if the formatting is not as neat as I would do usually - I just typed this in off the top of my head using a proportional font, so it's a little hard to make it all line up... (actually by the time I'd written that explanation, I could have done it!).

Best Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.