• 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 copy selected objects from the current schematic...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 142
  • Views 17662
  • 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 copy selected objects from the current schematic window to other schematic window by using SKILL?

Marben
Marben over 6 years ago

Hi All,

How to copy selected objects from the current schematic window to other schematic window
using SKILL?
I used the following code to copy selected objects in the layout window to other layout window,
it works perfectly. But when I used it to copy selected oblects from the schematic to other
schematic window, there are errors created in the new schematic window, please see the picture below.
Please help.

/* abCopyToOtherWin.il
Author     A.D.Beckett
Group      Custom IC (UK), Cadence Design Systems Ltd.
Language   SKILL
Date       Mar 06, 2013
Modified   
By         

Put the copy on a bindkey, say:

hiSetBindKey("Layout" "<Key>F8" "abCopyToOtherWin()")

Copies selected objects from the current window to the window you click in when prompted

***************************************************

SCCS Info: @(#) abCopyToOtherWin.il 03/06/13.12:16:39 1.1

*/

procedure(abCopyToOtherWinCB(srcWin _dont _points)
    let((destCv)
        ;----------------------------------------------------------------
        ; Since current window will be the destination window, this is correct
        ;----------------------------------------------------------------
        destCv=geGetWindowCellView()
        foreach(fig geGetSelSet(srcWin)
            ;------------------------------------------------------------
            ; Transformation is effectively null, since want the
            ; positions to be the same
            ;------------------------------------------------------------
            dbCopyFig(fig destCv list(0:0 "R0" 1))
        )
        t
    )
)

procedure(abCopyToOtherWin(@optional (srcWin hiGetCurrentWindow()))
    unless(windowp(srcWin) error("Must have a valid window to start from"))
    hiSetCurrentWindow(srcWin)
    enterMultiRep(
        ?prompts '("Point to the source window" "Point to the destination window")
        ?points list(0:0)
        ?doneProc "abCopyToOtherWinCB"
        ?dontDraw t
    )
hiSetBindKey("Layout" "<Key>F8" "abCopyToOtherWin()")
hiSetBindKey("Schematics" "<Key>F8" "abCopyToOtherWin()")
)



Best regards,
Marben

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    Hi Marben,

    Do Check->Current CellView (typically the "x" bindkey) or File->Check and Save (typically shift-X) after doing the copy. 

    The issue is that the cdsTerm labels on the transistor symbols can't display the nets because the nets do not get partially extracted after a copy using SKILL and the internal database has not been synchronised. So a better solution might be to change the code as follows (small change in abCopyToOtherWinCB):

    /* abCopyToOtherWin.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Mar 06, 2013 
    Modified   Dec 15, 2018 
    By         A.D.Beckett
    
    Put the copy on a bindkey, say:
    
    hiSetBindKey("Layout" "<Key>F8" "abCopyToOtherWin()")
    
    Copies selected objects from the current window to the window you click in when prompted
    
    Updated in v1.2 to better handle schematics
    
    ***************************************************
    
    SCCS Info: @(#) abCopyToOtherWin.il 12/15/18.11:45:19 1.2
    
    */
    
    procedure(abCopyToOtherWinCB(srcWin _dont _points)
        let((destCv)
            ;----------------------------------------------------------------
            ; Since current window will be the destination window, this is correct
            ;----------------------------------------------------------------
            destCv=geGetWindowCellView()
            foreach(fig geGetSelSet(srcWin)
                ;------------------------------------------------------------
                ; Transformation is effectively null, since want the
                ; positions to be the same
                ;------------------------------------------------------------
                dbCopyFig(fig destCv list(0:0 "R0" 1))
            )
            ;----------------------------------------------------------------
            ; Sync the schematic internal database representations
            ;----------------------------------------------------------------
            when(destCv~>cellViewType=="schematic"
                schSync(list(destCv))
            )
            t
        )
    )
    
    procedure(abCopyToOtherWin(@optional (srcWin hiGetCurrentWindow()))
        unless(windowp(srcWin) error("Must have a valid window to start from"))
        hiSetCurrentWindow(srcWin)
        enterMultiRep(
            ?prompts '("Point to the source window" "Point to the destination window")
            ?points list(0:0)
            ?doneProc "abCopyToOtherWinCB"
            ?dontDraw t
        )
    )
    

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Marben
    Marben over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    It almost works.

    All errors display in the copied window is gone.

    There is only one more problem.

    The pin net name is not copied.

    There must be something like "VP", "a" , "y" . . .etc in the target schematic window to which selected objects is to be copied,

    not " ipin", ipin" "opin" .

    Best regards,

    Marben

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Marben

    Hi Marben,

    Whoops! I didn't notice that. Not surprising, because dbCopyFig is only going to copy the figure and not the pin. So I changed the code a little to use schCopy instead when it's a schematic, which should handle the more complex objects. This seems to work:

    /* abCopyToOtherWin.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Mar 06, 2013 
    Modified   Dec 15, 2018 
    By         A.D.Beckett
    
    Put the copy on a bindkey, say:
    
    hiSetBindKey("Layout" "<Key>F8" "abCopyToOtherWin()")
    
    Copies selected objects from the current window to the window you click in when prompted
    
    Updated in v1.2 to better handle schematics. Did it properly in v1.3!
    
    ***************************************************
    
    SCCS Info: @(#) abCopyToOtherWin.il 12/15/18.13:01:02 1.3
    
    */
    
    procedure(abCopyToOtherWinCB(srcWin _dont _points)
        let((destCv isSch)
            ;----------------------------------------------------------------
            ; Since current window will be the destination window, this is correct
            ;----------------------------------------------------------------
            destCv=geGetWindowCellView()
            isSch=destCv~>cellViewType=="schematic"
            foreach(fig geGetSelSet(srcWin)
                ;------------------------------------------------------------
                ; Transformation is effectively null, since want the
                ; positions to be the same
                ;------------------------------------------------------------
                if(isSch then
                    schCopy(fig destCv list(0:0 "R0" 1))
                else
                    dbCopyFig(fig destCv list(0:0 "R0" 1))
                )
            )
            t
        )
    )
    
    procedure(abCopyToOtherWin(@optional (srcWin hiGetCurrentWindow()))
        unless(windowp(srcWin) error("Must have a valid window to start from"))
        hiSetCurrentWindow(srcWin)
        enterMultiRep(
            ?prompts '("Point to the source window" "Point to the destination window")
            ?points list(0:0)
            ?doneProc "abCopyToOtherWinCB"
            ?dontDraw t
        )
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Marben
    Marben over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    It is now working perfectly.

    Thank you very much.

    Schematic check completed with no errors.

    Best regards,

    Marben

    • 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