• 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. Skill code to perform cut,copy paste operations( as in MS...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 2224
  • 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

Skill code to perform cut,copy paste operations( as in MS execl)

deepak1947
deepak1947 over 14 years ago
Hello, I was trying to build a skill code which could do the cut,copy, paste operations of any selected layer(s)/instances(s) from one cell view to other or from one hierarchy to other. The result would be copying/moving in the exact x,y location of selected layer(s)/instances(s) from one cell view to other or from one hierarchy to other. I tried to use the leYankFigs() and lePasteFigs() for this, but this code only copies(not moves) any selected layer(s)/instances(s) from one cell view to other. Also is acts as leYank() function wherein it copies all the layers from a selected area. The code I tried is: hiSetBindKey("Layout" "Ctrlc" "mscopy()") procedure(mscopy() prog((cv selectedset) cv=geGetEditCellView() selectedset=geGetSelectedSet() points=selectedset~>bBox temp = xCoord( lowerLeft( points )) temp1 = yCoord( lowerLeft( points )) llx = car(temp) lly = cadr(temp) urx = car(temp1) ury = cadr(temp1) lrx = urx lry = lly ulx = llx uly = ury ;leYankFigs( cv list( 0:0 10:0 10:10 0:10 ) 2 ) leYankFigs( cv list( llx:lly lrx:lry urx:ury ulx:uly ) 2) );prog );procedure hiSetBindKey("Layout" "Ctrlv" "mspaste()") procedure(mspaste() prog((cv selectedset) cv=geGetEditCellView() lePasteFigs( cv llx:lly) );prog );procedure
  • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 14 years ago

     Both dbMoveFig and dbCopyFig have a cellView argument which allows you to move/copy shapes from one cellView to another. Since these work on on shape at a time, you have to put them in a loop. The transform can be used to move/rotate the shapes in the new cellView:

    foreach( shape listOfShapeToMove
      dbMoveFig( shape newCellView [(0:0 "R90)] ) ;; Leave out the transform if you want things to go in the same place.
    )

     

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • deepak1947
    deepak1947 over 14 years ago

    Thanks Ted!.

     I just modified the code a little for my convienence :

    hiSetBindKey("Layout" "Ctrl<Key>c" "mscopy()")

    hiSetBindKey("Layout" "Ctrl<Key>v" "mspaste()")

    procedure(mscopy()

    cv=geGetEditCellView()
    src=geGetSelectedSet()
    )

     

    procedure(mspaste()
    prog((cv2)
    cv2=geGetEditCellView()

    foreach( shape src
      dbCopyFig(shape  cv2 )
      )  
    );procedure
    );prog

     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    hiSetBindKey("Layout" "Ctrl<Key>x" "mscut()")

    hiSetBindKey("Layout" "Ctrl<Key>m" "msmove()")

    procedure(mscut()

    cv=geGetEditCellView()
    src=geGetSelectedSet()
    )

    procedure(msmove()
    prog((cv2)
    cv2=geGetEditCellView()

    foreach( shape src
      dbMoveFig(shape  cv2 )
      )  
    );procedure
    );prog

     

     

    • 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