• 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

    Here is the newer version of the code, version 1.2:

    procedure(CCStoggleLayerSel()
      let( (cv layer purpose lpp shapes)
        ;; obtain the current cellview
        cv = geGetEditCellView()
        layer = car(leGetEntryLayer())
        purpose = cadr(leGetEntryLayer())
        ;; find the layer-purpose pair object for the current entry layer
        lpp = car(setof(lpp cv~>lpps lpp~>layerName==layer &&
                        lpp~>purpose==purpose))
        ;; get all of the shapes on the current lpp object
        shapes = lpp~>shapes
        ;; 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))
          ;; there is no "geDeselectFigs()" function, so instead,
          ;; iterate over the shapes, deselect each shape in turn
          mapc('geDeselectFig shapes)
          ;; ELSE select all of the shapes in one go
          geSelectFigs(shapes)
        ); if
      ); let
    ); procedure CCStoggleLayerSel
    

    As Ted pointed out, this will be much more efficient - evident when there are many shapes.

    I hope that this helps everyone! (This will be posted as a solution on SourceLink too.)

    Regards,

    Lawrence

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 16 years ago

    Here is the newer version of the code, version 1.2:

    procedure(CCStoggleLayerSel()
      let( (cv layer purpose lpp shapes)
        ;; obtain the current cellview
        cv = geGetEditCellView()
        layer = car(leGetEntryLayer())
        purpose = cadr(leGetEntryLayer())
        ;; find the layer-purpose pair object for the current entry layer
        lpp = car(setof(lpp cv~>lpps lpp~>layerName==layer &&
                        lpp~>purpose==purpose))
        ;; get all of the shapes on the current lpp object
        shapes = lpp~>shapes
        ;; 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))
          ;; there is no "geDeselectFigs()" function, so instead,
          ;; iterate over the shapes, deselect each shape in turn
          mapc('geDeselectFig shapes)
          ;; ELSE select all of the shapes in one go
          geSelectFigs(shapes)
        ); if
      ); let
    ); procedure CCStoggleLayerSel
    

    As Ted pointed out, this will be much more efficient - evident when there are many shapes.

    I hope that this helps everyone! (This will be posted as a solution on SourceLink too.)

    Regards,

    Lawrence

    • Cancel
    • Vote Up 0 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