• 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. What am i doing wrong?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 13447
  • 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

What am i doing wrong?

ssram
ssram over 6 years ago

If i do

shapes=geGetSelSet()~>layerName

i get all the selected layer names. And if my output is something like

("m0" "m0" "m0" "m0" "m1" "m1" "m2" "m2" "m0" "m2")

how do i get only the list of "m0" ?

  • Cancel
  • RK56
    RK56 over 6 years ago

    Hi,

    You can use "setof" to filter a list

    setof(x geGetSelSet() x~>layerName=="m0")

    The above line will return a list of shapes (db IDs)  that are only of layer "m0".

    There also another function named "exists" which works similarly, but I prefer "setof".

    -Ramakrishnan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to RK56
    RK56 said:
    There also another function named "exists" which works similarly, but I prefer "setof".

    I should point out that exists doesn't really work similarly - exists returns the remainder of the list which starts with the first element that matches the condition, whereas setof returns only the elements of the list which match the condition...

    Sorry to be pedantic - just didn't want ssram to head off in the wrong direction.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RK56
    RK56 over 6 years ago in reply to Andrew Beckett

    Thanks Andrew. I did not know that.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ssram
    ssram over 6 years ago in reply to RK56

    Thank you Ramakrishnan. I got it working!

    • 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