• 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. Looking for Virtuoso L/XL feature or SKILL that will allow...

Stats

  • Replies 1
  • Subscribers 151
  • Views 111
  • Members are here 0

Looking for Virtuoso L/XL feature or SKILL that will allow select by line to select odd/even objects

Finn Huckle
Finn Huckle 3 days ago

Hi Cadence Community,

I am using select by line on Virtuoso L/XL.

Is there a built in feature that will allow me to select odd/even objects only.

For example If  have a row of mos devices and would start select by line from the left.

It will only select the 1st, 3rd, 5th ...etc. object for odd. 

The same goes for even objects.

Please help.

  • Sign in to reply
  • Cancel

Top Replies

  • Aurel B
    Aurel B 2 days ago +1
    ( inScheme ( defun select_aligned ( @key ( obj ( car ( geGetSelectedSet )) ) ( cv obj -> cellView ) ( direction ' horizontal ) ( modulo 2 ) ( shift 0 ) @rest _ ) "Return objects in CV that have…
Parents
  • Aurel B
    Aurel B 2 days ago
    (inScheme
      (defun select_aligned ( @key
                              ( obj       (car (geGetSelectedSet)) )
                              ( cv        obj->cellView            )
                              ( direction 'horizontal              )
                              ( modulo    2                        )
                              ( shift     0                        )
                              @rest _ )
        "Return objects in CV that have the same master as OBJ and are aligned with it according to DIRECTION.
    Returned list of objects is filtered by MODULO and SHIFT."
        ;; Check inputs
        (assert (dbobjectp obj)                                      "select_aligned - ?obj should be a dbobject: %N" cv)
        (assert (and (dbobjectp cv ) (equal "cellView" cv->objType)) "select_aligned - ?cv should be a cellview: %N"  cv)
        (letseq ( ( x           (xCoord (lowerLeft obj->bBox)) )
                  ( y           (yCoord (lowerLeft obj->bBox)) )
                  ( master      obj->master                    )
                  ( index       0                              )
                  ( targets     (cond
                                  ( obj->isAnyInst cv->instances )
                                  ( obj->isShape   cv->shapes    )
                                  ( t (error "select_aligned - ?obj should be an instance or a shape: %N %N" obj obj->objType) )
                                  ) )
                  ;; Function to check similarity
                  ( is_similar? (case obj->objType
                                  ( "inst" (lambda (o) (eq master o->master))           )
                                  ( t      (lambda (o) (equal obj->objType o->objType)) )
                                  ) )
                  ;; Function to check alignment
                  ( is_aligned? (caseq direction
                                  ( ( vert  vertical   ) (lambda (o) (nearlyEqual x (xCoord (lowerLeft o->bBox)))) )
                                  ( ( horiz horizontal ) (lambda (o) (nearlyEqual y (yCoord (lowerLeft o->bBox)))) )
                                  ( t (error "select_aligned - ?direction is not in '( vert vertical horiz horizontal ): %N" direction) )
                                  ) )
                  )
          ;; Filter similar and aligned instances
          (setq targets (setof o targets (and (is_similar? o) (is_aligned? o))))
          ;; Sort instances by coordinates
          (setq targets
            (sort targets
              (caseq direction
                ( ( vert  vertical   ) (lambda (o0 o1) (lessp (yCoord (lowerLeft o0->bBox)) (yCoord (lowerLeft o1->bBox)))) )
                ( ( horiz horizontal ) (lambda (o0 o1) (lessp (xCoord (lowerLeft o0->bBox)) (xCoord (lowerLeft o1->bBox)))) )
                )))
          ;; Filter by modulo and shift
          (setq targets (setof _o targets (eq shift (mod index++ modulo))))
          ;; Select resulting objects
          (geDeselectAllFig)
          (geSelectFigs targets)
          ))
      );SKILL++
    
    ;; Examples
    ; (select_aligned)                  ; select even similar objects aligned horizontally
    ; (select_aligned ?shift     1)     ; select odd  similar objects aligned horizontally
    ; (select_aligned ?direction 'vert) ; select even similar objects aligned vertically
    
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Aurel B
    Aurel B 2 days ago
    (inScheme
      (defun select_aligned ( @key
                              ( obj       (car (geGetSelectedSet)) )
                              ( cv        obj->cellView            )
                              ( direction 'horizontal              )
                              ( modulo    2                        )
                              ( shift     0                        )
                              @rest _ )
        "Return objects in CV that have the same master as OBJ and are aligned with it according to DIRECTION.
    Returned list of objects is filtered by MODULO and SHIFT."
        ;; Check inputs
        (assert (dbobjectp obj)                                      "select_aligned - ?obj should be a dbobject: %N" cv)
        (assert (and (dbobjectp cv ) (equal "cellView" cv->objType)) "select_aligned - ?cv should be a cellview: %N"  cv)
        (letseq ( ( x           (xCoord (lowerLeft obj->bBox)) )
                  ( y           (yCoord (lowerLeft obj->bBox)) )
                  ( master      obj->master                    )
                  ( index       0                              )
                  ( targets     (cond
                                  ( obj->isAnyInst cv->instances )
                                  ( obj->isShape   cv->shapes    )
                                  ( t (error "select_aligned - ?obj should be an instance or a shape: %N %N" obj obj->objType) )
                                  ) )
                  ;; Function to check similarity
                  ( is_similar? (case obj->objType
                                  ( "inst" (lambda (o) (eq master o->master))           )
                                  ( t      (lambda (o) (equal obj->objType o->objType)) )
                                  ) )
                  ;; Function to check alignment
                  ( is_aligned? (caseq direction
                                  ( ( vert  vertical   ) (lambda (o) (nearlyEqual x (xCoord (lowerLeft o->bBox)))) )
                                  ( ( horiz horizontal ) (lambda (o) (nearlyEqual y (yCoord (lowerLeft o->bBox)))) )
                                  ( t (error "select_aligned - ?direction is not in '( vert vertical horiz horizontal ): %N" direction) )
                                  ) )
                  )
          ;; Filter similar and aligned instances
          (setq targets (setof o targets (and (is_similar? o) (is_aligned? o))))
          ;; Sort instances by coordinates
          (setq targets
            (sort targets
              (caseq direction
                ( ( vert  vertical   ) (lambda (o0 o1) (lessp (yCoord (lowerLeft o0->bBox)) (yCoord (lowerLeft o1->bBox)))) )
                ( ( horiz horizontal ) (lambda (o0 o1) (lessp (xCoord (lowerLeft o0->bBox)) (xCoord (lowerLeft o1->bBox)))) )
                )))
          ;; Filter by modulo and shift
          (setq targets (setof _o targets (eq shift (mod index++ modulo))))
          ;; Select resulting objects
          (geDeselectAllFig)
          (geSelectFigs targets)
          ))
      );SKILL++
    
    ;; Examples
    ; (select_aligned)                  ; select even similar objects aligned horizontally
    ; (select_aligned ?shift     1)     ; select odd  similar objects aligned horizontally
    ; (select_aligned ?direction 'vert) ; select even similar objects aligned vertically
    
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • 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.

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

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