• 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 open a schematic window from a layout window

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 143
  • Views 22249
  • 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 open a schematic window from a layout window

blankman
blankman over 12 years ago

 Hi All,

Im looking to write code to open a corresponding schematic view from a layout window. I have the command below, (which uses predefined variables BSlibname1, BSblockname1 and BSviewname1 to call the cell info) but I'm hoping to extract this info from the open layout window. Would anyone know how to go about this?

Thanks,
Brian.

BSlibname1="adf4355_1"
BSblockname1="adf4355_1_r0"
BSviewname1="schematic"

hiSetBindKey("Layout" "Ctrl Alt Shift<key>1" "win1=hiCreateWindow('((0 248) (1410 1175)) \"graphics\" \"schematic_win\" \"\" t) geOpen(?window win1 ?lib BSlibname1 ?cell BSblockname1 ?view BSviewname1 ?mode \"r\") hiResizeWindow(win1 list(0:248 1410:1175))")

  • Cancel
Parents
  • dmay
    dmay over 12 years ago

    Here is how I do it. This routine will work on both layouts and schematics. It will raise an already open window and prompt you to create cells that don't yet exist.

    hiSetBindKey("Layout" "Ctrl Alt Shift1" "myOpenOtherView()")
    hiSetBindKey("Schematics" "Ctrl Alt Shift1" "myOpenOtherView()") 

    procedure(myOpenOtherView(@optional (viewName nil) (cv geGetEditCellView()))
      let((cellWin otherCv msg dbox viewType)
        unless(stringp(viewName)
            if(cv~>viewName=="schematic" then
                viewName="layout"
                viewType="maskLayout"
            else
                viewName="schematic"
                viewType="schematic"
            )
        )
        otherCv = dbOpenCellViewByType(cv~>libName cv~>cellName viewName)
        if(otherCv then
            unless(geGetCellViewWindow(otherCv)
                deOpenCellView(otherCv~>libName otherCv~>cellName otherCv~>viewName viewType nil "r")
            ) ;unless
            cellWin=geGetCellViewWindow(otherCv)
            hiDeiconifyWindow(cellWin)
            hiSetCurrentWindow(cellWin)
            hiRaiseWindow(cellWin)
        else
            hiGetAttention()
            sprintf(msg "**WARNING: Could not open %s %s %L\n" cv~>libName cv~>cellName viewName)
            sprintf(msg "%s           Would you like to create this view?\n" msg)          
            dbox=hiDisplayAppDBox(?name 'dBox ?buttonLayout 'YesNo ?dboxText msg ?dboxBanner "Create this view?")
            if(dbox then
                printf("Creating: %s %s %L\n" cv~>libName cv~>cellName viewName)
                if(otherCv = dbOpenCellViewByType(cv~>libName cv~>cellName viewName viewType "a") then
                    deOpenCellView(otherCv~>libName otherCv~>cellName otherCv~>viewName viewType nil "a")
                else
                    hiGetAttention()
                    printf("**ERROR: Could not create %s %s %L\n" cv~>libName cv~>cellName viewName)
                )
            else
                printf("Cell view %s %s %L does not exist and was not created\n" cv~>libName cv~>cellName viewName)
            )
        )
        otherCv
      ) ;let
    ) ;proc

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 12 years ago

    Here is how I do it. This routine will work on both layouts and schematics. It will raise an already open window and prompt you to create cells that don't yet exist.

    hiSetBindKey("Layout" "Ctrl Alt Shift1" "myOpenOtherView()")
    hiSetBindKey("Schematics" "Ctrl Alt Shift1" "myOpenOtherView()") 

    procedure(myOpenOtherView(@optional (viewName nil) (cv geGetEditCellView()))
      let((cellWin otherCv msg dbox viewType)
        unless(stringp(viewName)
            if(cv~>viewName=="schematic" then
                viewName="layout"
                viewType="maskLayout"
            else
                viewName="schematic"
                viewType="schematic"
            )
        )
        otherCv = dbOpenCellViewByType(cv~>libName cv~>cellName viewName)
        if(otherCv then
            unless(geGetCellViewWindow(otherCv)
                deOpenCellView(otherCv~>libName otherCv~>cellName otherCv~>viewName viewType nil "r")
            ) ;unless
            cellWin=geGetCellViewWindow(otherCv)
            hiDeiconifyWindow(cellWin)
            hiSetCurrentWindow(cellWin)
            hiRaiseWindow(cellWin)
        else
            hiGetAttention()
            sprintf(msg "**WARNING: Could not open %s %s %L\n" cv~>libName cv~>cellName viewName)
            sprintf(msg "%s           Would you like to create this view?\n" msg)          
            dbox=hiDisplayAppDBox(?name 'dBox ?buttonLayout 'YesNo ?dboxText msg ?dboxBanner "Create this view?")
            if(dbox then
                printf("Creating: %s %s %L\n" cv~>libName cv~>cellName viewName)
                if(otherCv = dbOpenCellViewByType(cv~>libName cv~>cellName viewName viewType "a") then
                    deOpenCellView(otherCv~>libName otherCv~>cellName otherCv~>viewName viewType nil "a")
                else
                    hiGetAttention()
                    printf("**ERROR: Could not create %s %s %L\n" cv~>libName cv~>cellName viewName)
                )
            else
                printf("Cell view %s %s %L does not exist and was not created\n" cv~>libName cv~>cellName viewName)
            )
        )
        otherCv
      ) ;let
    ) ;proc

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ssram
    ssram over 5 years ago in reply to dmay

    Hello Derek,

    Do you know how this code could be modified to open the other view in XL mode (in read only mode) without needing to open those extra GUIs?

    So if you are in schematic window, how can i open the layout in LayoutXL mode and if you are in layout window, open the schematic with LayoutXL mdoe.

    Thanks

    Ram

    • 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