• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to keep top level lable while flatten to bottom

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 13393
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to keep top level lable while flatten to bottom

zhisong
zhisong over 13 years ago

Dear,

Now I want to flat a layout, meanwhile I need to keep top level label and delete others in sub level.

Because I don't have edit permission for part of sub block, so I have to store top level label to variable, then flatten all block and delete all labels, at last restore top level label to original.

But how to store all label database?

Or any idea to keep these label? Thanks

-Jason

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Jason,

    There's a CCR (I believe) for dbFlattenInst to be able to return a list of newly flattened objects, but in the absence of that enhancement, you could create a table using makeTable(), and then store the original labels as keys into the table. So something like this:

    labelTable=makeTable('labelTable nil)
    foreach(shape cv~>shapes
      when(shape~>objType=="label"
        labelTable[shape]=t
      )
    )
    dbFlattenInst(...)
    foreach(shape cv~>shapes
      when(shape~>objType=="label" && !labelTable[shape]
        dbDeleteObject(shape)
      )
    )
    ; clear the table so it can be garbage collected (no need to do this if labelTable is a local variable)
    labelTable=nil

    Please note I have not tested this - this is just typed in off the top of my head...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • zhisong
    zhisong over 13 years ago

    Hi AB,

    I can't believe that I have forgotten && !labelTable  to filter obj to be deleted.

    Thanks for your informaion.

     PS, it should be !boundp(labelTable[shape])

    Jason

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information