• 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 select and deselect a layer using only one bind key...

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 145
  • Views 23611
  • 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 select and deselect a layer using only one bind key?

IC Layout
IC Layout over 16 years ago

 Hello! Everybody, GoodEvening to all,

Please, can anybody help me in giving the solution for this question. 

I am using cadence IC514 version.

I would like to select a layer using one bind key also it should deselect the same layer if I press the same bind key.

Thanks in advance...

                             waiting for Ur replys.........

                                            Prabhakar-The VLE
 

  • Cancel
Parents
  • skillUser
    skillUser over 16 years ago

     Hi Prabhakar,

    I will guess that you are talking about selecting shapes on a specific layer-purpose pair since you also mentioned deselection.

    There are probably a few different approaches that you could take (for selection):

    • Iterate over the shapes in the cellview that match and select them
    • Iterate over the shapes in the cellview and select those that match
    • Select everything and deselect things that do not match

    I would think that the first method is probably the most efficient way out of those I mentioned.  To keep it simple, you could use the current LSW layer as the way of specifying which layer you want to select shapes on. An alternative might be to look at which shape the mouse is over and use the layer of that shape.  So the bindkey for selection could be as simple as the following:

    geSelectFigs(setof(shape geGetEditCellView()~>shapes shape~>lpp==leGetEntryLayer()))

    In other words, "select all of the shapes that are in the set of shapes in the cellview such that the shape has the same layer-purpose pair as the current entry layer in the LSW".  Assign it to a bindkey, for example:

    hiSetBindKey("Layout" "F8" "geSelectFigs(setof(shape geGetEditCellView()~>shapes shape~>lpp==leGetEntryLayer()))")

    Now, for deselection, do you want to deselect everything (e.g. the <Ctrl>-D bindkey), or everything on that layer only?  If you want the latter, and you want a single bindkey to do the work, then it probably would be a good idea to put the code in a procedure.  This procedure could test if any of the shapes on the layer are already selected, and if so, deslect the shapes on the layer, otherwise, select the shapes on the layer (as in the above example). So you might do something like the following:

    
    procedure(CCStoggleLayerSel()
      let( (cv shapes)
        cv = geGetEditCellView()
        shapes = setof(shape cv~>shapes shape~>lpp==leGetEntryLayer())
        ;; if at least one shape is even partially selected, then deselect all 
        ;; the shapes on that layer, otherwise select all the shapes on that layer
        if( exists(shape shapes geIsFigSelected(shape))
          mapc('geDeselectFig shapes)
          geSelectFigs(shapes)
        ); if
      ); let
    ); procedure CCStoggleLayerSel
    

    I hope that this is the sort of thing that you were looking for.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 16 years ago

     Hi Prabhakar,

    I will guess that you are talking about selecting shapes on a specific layer-purpose pair since you also mentioned deselection.

    There are probably a few different approaches that you could take (for selection):

    • Iterate over the shapes in the cellview that match and select them
    • Iterate over the shapes in the cellview and select those that match
    • Select everything and deselect things that do not match

    I would think that the first method is probably the most efficient way out of those I mentioned.  To keep it simple, you could use the current LSW layer as the way of specifying which layer you want to select shapes on. An alternative might be to look at which shape the mouse is over and use the layer of that shape.  So the bindkey for selection could be as simple as the following:

    geSelectFigs(setof(shape geGetEditCellView()~>shapes shape~>lpp==leGetEntryLayer()))

    In other words, "select all of the shapes that are in the set of shapes in the cellview such that the shape has the same layer-purpose pair as the current entry layer in the LSW".  Assign it to a bindkey, for example:

    hiSetBindKey("Layout" "F8" "geSelectFigs(setof(shape geGetEditCellView()~>shapes shape~>lpp==leGetEntryLayer()))")

    Now, for deselection, do you want to deselect everything (e.g. the <Ctrl>-D bindkey), or everything on that layer only?  If you want the latter, and you want a single bindkey to do the work, then it probably would be a good idea to put the code in a procedure.  This procedure could test if any of the shapes on the layer are already selected, and if so, deslect the shapes on the layer, otherwise, select the shapes on the layer (as in the above example). So you might do something like the following:

    
    procedure(CCStoggleLayerSel()
      let( (cv shapes)
        cv = geGetEditCellView()
        shapes = setof(shape cv~>shapes shape~>lpp==leGetEntryLayer())
        ;; if at least one shape is even partially selected, then deselect all 
        ;; the shapes on that layer, otherwise select all the shapes on that layer
        if( exists(shape shapes geIsFigSelected(shape))
          mapc('geDeselectFig shapes)
          geSelectFigs(shapes)
        ); if
      ); let
    ); procedure CCStoggleLayerSel
    

    I hope that this is the sort of thing that you were looking for.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
No Data

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