• 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. Could you please give me the procedure which returns the...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 7166
  • 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

Could you please give me the procedure which returns the bbox of all selected shapes.

Arokia
Arokia over 2 years ago

Hi

Could anyone give me the procedure (function) which returns the bbox of all selected shapes.

BTW will the geGetObjectSelectedSet function work in this case?

Thanks,

Arokia Bharat

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    I answered a very similar question in a post a year or so go.

    The geGetObjectSelectedSet() returns hierarchically selected objects - it's nothing to do with getting the bbox of selected shapes.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    I answered a very similar question in a post a year or so go.

    The geGetObjectSelectedSet() returns hierarchically selected objects - it's nothing to do with getting the bbox of selected shapes.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Arokia
    Arokia over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    Based on your previous program, the geGetSelSet()~>bBox statement helps extract the bBox of the selected object, but lets say I want to extract the Layer type, for example M1 drawing or M2 drawing. May I please know what "Statement" I can use? As I would like to use an IF statement to perform actions based on the type of Layer. 

    Previous Program given to me a year back. 

    procedure(CCFshowBBox(@key printIndividual printOverall (figs geGetSelSet()))
      when(figs
        destructuringBind(((ollx olly) (ourx oury)) car(figs)~>bBox
          foreach(fig figs
            when(printIndividual
              printf("Selected item bBox: %L\n" fig~>bBox)
            )
            destructuringBind(((llx lly) (urx ury)) fig~>bBox
              ollx=min(ollx llx)
              olly=min(olly lly)
              ourx=max(ourx urx)
              oury=max(oury ury)
            )
          )
          when(printOverall
            printf("Overall bBox of selected objects: %L\n"
              list(ollx:olly ourx:oury))
          )
          list(ollx:olly ourx:oury)
        )
      )
    )


    Thanks,
    Arokia Bharat
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Arokia
    Arokia over 2 years ago in reply to Arokia

    I tried a few things.

    On the CIW window I gave the statement geGetSelSet()~>?

    After doing this it showed a couple of properties identifiers.

    So I decided to grab the below. 

    1. geGetSelSet()~>layerName 

    For extracting the name of the layer property. 

    2. geGetSelSet()~>purpose

    for extracting the layer purpose

    3. I guess height and width can be extracted from geGetSelSet()~>bBox

    But any short cut would be helpful. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Arokia

    Hi Arokia,

    It's not entirely obvious what it is you want to do, but you could use (say) inside the foreach loop:

    if(fig~>layerName=="M1" && fig~>purpose=="drawing" then
      ... do something...
    else
      ... do something else...
    )

    I'd also not noticed that original question a year ago was essentially the same as this one. I found the original post but didn't notice it was also asked by you.

    Andrew

    • 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