• 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 Design
  3. How to create personalized menu in virtuoso layout edit...

Stats

  • Locked Locked
  • Replies 29
  • Subscribers 130
  • Views 34613
  • 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 create personalized menu in virtuoso layout editor

AmitBiswas
AmitBiswas over 14 years ago
Hi, I have written few scripts in skill language. I want group all the scripts together into a single menu in virtuoso layout editor. Like in the layout editor window there are several menus at the top containing multiple functions, I want to create my personalized menu in the layout editor window. I also want to put that script in the .cdsinit file, so that when cadence will be started the menus will be loaded automatically in the layout editor window like the other menus. Thanks in advance, Amit
  • Cancel
Parents
  • Amit Biswas
    Amit Biswas over 14 years ago
    Lawrence
    Now I did exactly what you said. Her is the complete code.It is not working.
    I am getting one error in CIW when I am opening a layout

    ;*************************** Error copied from the CIW *************************************************

    dagDoNamedAction( dagNumToTool(4) dagGetObjectByPath( dagNumToTool(4) '( "ILBRootNode" "ILBRootClass"  "amit_test1" "ILBLibraryClass"  "Everything" "ILBCategoryClass"  "RECT_TEST" "ILBCellClass"  "layout" "ILBCellViewClass" )) "Read" )
    *Error* My_Custom_Menu: too many arguments (0 expected, 1 given) - ((nil wasPushed nil prependList nil configId nil configL nil libName "amit_test1" libId dd:0x1e4959d0 cellName "RECT_TEST" viewName "layout" viewType "maskLayout" fileName nil viewFileId dd:0x1e495b90 accessMode "r" viewNameList nil hierarchy ("{amit_test1 RECT_TEST layout }:r") hierPath "" appName "Layout" help "Layout" rootType "maskLayout" action install eip nil pushed nil window window:12 srcContext nil instanceName "" checkOutLicense t sessionWindow swindow:2 subMaster nil))
    <<< Stack Trace >>>
    (... in _deApplyTrigger ...)
    (... in unknown ...)
    funobj@0x19cdc660()
    (... in _dePullTrigger ...)
    (... in _deCallUserPostInstallTrigger ...)
    (... in _dePostOpenProcess ...)
    (... in _deOpen ...)
    (... in deOpen ...)
    deOpen(myFileSpec myWindowSpec myAccessMode)
    if((fileType == "cds44") then (masterFileName = substring(rindex(masterFile "/") 2)) if(!(fileId = ddGetObj(libraryName cellName viewName masterFileName)) then sprintf(msg "Unable to determine file id") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if((fileLength((fileId->readPath)) == 0) then sprintf(msg "File is zero length. Perhaps this cellview has not \nbeen saved yet. Try using 'Edit' instead.") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if(generateDplOnly then return(list(nil 'library libraryName 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file (fileId->readPath)))) (myFileSpec = list(nil 'libName libraryName 'cellName cellName 'viewName viewName)) (myWindowSpec = nil) (myAccessMode = "read") deOpen(myFileSpec myWindowSpec myAccessMode) else (fullFileName = strcat(sourceDir "/" masterFile)) if(generateDplOnly then return(list(nil 'library libraryName 'libraryPath libraryPath 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file fullFileName))) ICLInvokeReader(libraryPath libraryName cellName viewName levelName sandboxName fullFileName))
    prog((sourceDir fileId myFileSpec myWindowSpec myAccessMode viewType masterFileName masterFile msg fileType mfpStruct fullFileName) if((sandboxName && (sandboxName != "")) then (sourceDir = ICLSandboxDir(libraryPath libraryName sandboxName)) if(!sourceDir then return()) else if((levelName && (levelName != "")) then (sourceDir = ICLLevelDir(libraryPath libraryName levelName)) if(!sourceDir then return()))) sprintf(msg "Unable to retrieve master filepath for view %s" viewName) (mfpStruct = (ICLGetMasterFilePath ?libraryPath libraryPath ?library libraryName ?cell cellName ?view viewName ?errorMsg msg ?printWhen "error" ?directory sourceDir ?returnStruct t)) (masterFile = car((mfpStruct->values))) if(((mfpStruct->rc) == 2) then (fileType = "cds44")) if(!masterFile then return()) if(!fileType then sprintf(msg "Cannot determine file type of file %s." masterFile) (fileType = (ICLFileTypeMap ?libraryPath libraryPath ?library libraryName ?file masterFile ?errorMsg msg ?printWhen "error"))) if(!fileType then sprintf(msg "Unable to determine file type for view %" viewName) ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if((fileType == "cds44") then (masterFileName = substring(rindex(masterFile "/") 2)) if(!(fileId = ddGetObj(libraryName cellName viewName masterFileName)) then sprintf(msg "Unable to determine file id") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if((fileLength((fileId->readPath)) == 0) then sprintf(msg "File is zero length. Perhaps this cellview has not \nbeen saved yet. Try using 'Edit' instead.") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if(generateDplOnly then return(list(nil 'library libraryName 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file (fileId->readPath)))) (myFileSpec = list(nil 'libName libraryName 'cellName cellName 'viewName viewName)) (myWindowSpec = nil) (myAccessMode = "read") deOpen(myFileSpec myWindowSpec myAccessMode) else (fullFileName = strcat(sourceDir "/" masterFile)) if(generateDplOnly then return(list(nil 'library libraryName 'libraryPath libraryPath 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file fullFileName))) ICLInvokeReader(libraryPath libraryName cellName viewName levelName sandboxName fullFileName)))
    ICLBrowse(libraryPath libraryName sandboxName levelName cellName viewName versionNumber generateDplOnly)
    ...
    *WARNING* (DEBASE-102079): A Skill error occurred in function My_Custom_Menu
    t
    hiCloseWindow(window(13))
    t

    ;**************************************** Program starts ********************************

    procedure(My_Custom_Menu()
    win=hiGetCurrentWindow()
     
    Item1= hiCreateMenuItem(?name 'disco1
                 ?itemText "&item1"
                ?callback "println(\"Amit\")"
                )
    Item2= hiCreateMenuItem(?name 'disco2
                 ?itemText "i&tem2"
                ?callback "println(\"Kumar\")"
                )
     
    Item3= hiCreateMenuItem(?name 'disco3
                 ?itemText "it&em3"
                ?callback "println(\"Biswas\")"
                )
    Item4= hiCreateMenuItem(?name 'disco4
                 ?itemText "item4"
                ?callback "println(\"Halisahar\")"
                )
    Item5= hiCreateMenuItem(?name 'disco5
                 ?itemText "item5"
                ?callback "println(\"Pandit Para\")"
                )
    Item6= hiCreateMenuItem(?name 'disco6
                 ?itemText "item6"
                ?callback "println(\"Rabindrapally\")"
                )
     
    hiCreatePulldownMenu('trSubMenu2 "Address" list(Item4 Item5))
    hiCreatePulldownMenu('trSubMenu3 "Addr" list(Item1 Item6))
    slidmenus2=hiCreateSliderMenuItem(
                ?name 'slidmenus2
                ?itemText "Slide2"
                ?subMenu trSubMenu2
                )
    slidmenus3=hiCreateSliderMenuItem(
                ?name 'slidmenus3
                ?itemText "Slide3"
                ?subMenu trSubMenu3
                )           
    hiCreatePulldownMenu('trSubMenu1 "Name" list(Item1 Item2 Item3 slidmenus3))

    slidmenus1=hiCreateSliderMenuItem(
                ?name 'slidmenus1
                ?itemText "Slide1"
                ?subMenu trSubMenu1
                )
    hiCreatePulldownMenu('trPulldownMenu "Amit Menu" list(slidmenus1 slidmenus2 Item6))
    hiInsertBannerMenu(win  trPulldownMenu length(hiGetBannerMenus(win)))
    ;hiDeleteBannerMenu(win length(hiGetBannerMenus(win)))
    );procedure
    deRegUserTriggers("maskLayout" nil nil 'My_Custom_Menu)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Amit Biswas
    Amit Biswas over 14 years ago
    Lawrence
    Now I did exactly what you said. Her is the complete code.It is not working.
    I am getting one error in CIW when I am opening a layout

    ;*************************** Error copied from the CIW *************************************************

    dagDoNamedAction( dagNumToTool(4) dagGetObjectByPath( dagNumToTool(4) '( "ILBRootNode" "ILBRootClass"  "amit_test1" "ILBLibraryClass"  "Everything" "ILBCategoryClass"  "RECT_TEST" "ILBCellClass"  "layout" "ILBCellViewClass" )) "Read" )
    *Error* My_Custom_Menu: too many arguments (0 expected, 1 given) - ((nil wasPushed nil prependList nil configId nil configL nil libName "amit_test1" libId dd:0x1e4959d0 cellName "RECT_TEST" viewName "layout" viewType "maskLayout" fileName nil viewFileId dd:0x1e495b90 accessMode "r" viewNameList nil hierarchy ("{amit_test1 RECT_TEST layout }:r") hierPath "" appName "Layout" help "Layout" rootType "maskLayout" action install eip nil pushed nil window window:12 srcContext nil instanceName "" checkOutLicense t sessionWindow swindow:2 subMaster nil))
    <<< Stack Trace >>>
    (... in _deApplyTrigger ...)
    (... in unknown ...)
    funobj@0x19cdc660()
    (... in _dePullTrigger ...)
    (... in _deCallUserPostInstallTrigger ...)
    (... in _dePostOpenProcess ...)
    (... in _deOpen ...)
    (... in deOpen ...)
    deOpen(myFileSpec myWindowSpec myAccessMode)
    if((fileType == "cds44") then (masterFileName = substring(rindex(masterFile "/") 2)) if(!(fileId = ddGetObj(libraryName cellName viewName masterFileName)) then sprintf(msg "Unable to determine file id") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if((fileLength((fileId->readPath)) == 0) then sprintf(msg "File is zero length. Perhaps this cellview has not \nbeen saved yet. Try using 'Edit' instead.") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if(generateDplOnly then return(list(nil 'library libraryName 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file (fileId->readPath)))) (myFileSpec = list(nil 'libName libraryName 'cellName cellName 'viewName viewName)) (myWindowSpec = nil) (myAccessMode = "read") deOpen(myFileSpec myWindowSpec myAccessMode) else (fullFileName = strcat(sourceDir "/" masterFile)) if(generateDplOnly then return(list(nil 'library libraryName 'libraryPath libraryPath 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file fullFileName))) ICLInvokeReader(libraryPath libraryName cellName viewName levelName sandboxName fullFileName))
    prog((sourceDir fileId myFileSpec myWindowSpec myAccessMode viewType masterFileName masterFile msg fileType mfpStruct fullFileName) if((sandboxName && (sandboxName != "")) then (sourceDir = ICLSandboxDir(libraryPath libraryName sandboxName)) if(!sourceDir then return()) else if((levelName && (levelName != "")) then (sourceDir = ICLLevelDir(libraryPath libraryName levelName)) if(!sourceDir then return()))) sprintf(msg "Unable to retrieve master filepath for view %s" viewName) (mfpStruct = (ICLGetMasterFilePath ?libraryPath libraryPath ?library libraryName ?cell cellName ?view viewName ?errorMsg msg ?printWhen "error" ?directory sourceDir ?returnStruct t)) (masterFile = car((mfpStruct->values))) if(((mfpStruct->rc) == 2) then (fileType = "cds44")) if(!masterFile then return()) if(!fileType then sprintf(msg "Cannot determine file type of file %s." masterFile) (fileType = (ICLFileTypeMap ?libraryPath libraryPath ?library libraryName ?file masterFile ?errorMsg msg ?printWhen "error"))) if(!fileType then sprintf(msg "Unable to determine file type for view %" viewName) ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if((fileType == "cds44") then (masterFileName = substring(rindex(masterFile "/") 2)) if(!(fileId = ddGetObj(libraryName cellName viewName masterFileName)) then sprintf(msg "Unable to determine file id") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if((fileLength((fileId->readPath)) == 0) then sprintf(msg "File is zero length. Perhaps this cellview has not \nbeen saved yet. Try using 'Edit' instead.") ICLGetResponse(msg "INFO - IBMCadBrowser" hicInformationDialog 'Close) return()) if(generateDplOnly then return(list(nil 'library libraryName 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file (fileId->readPath)))) (myFileSpec = list(nil 'libName libraryName 'cellName cellName 'viewName viewName)) (myWindowSpec = nil) (myAccessMode = "read") deOpen(myFileSpec myWindowSpec myAccessMode) else (fullFileName = strcat(sourceDir "/" masterFile)) if(generateDplOnly then return(list(nil 'library libraryName 'libraryPath libraryPath 'cell cellName 'view viewName 'level levelName 'sandbox sandboxName 'file fullFileName))) ICLInvokeReader(libraryPath libraryName cellName viewName levelName sandboxName fullFileName)))
    ICLBrowse(libraryPath libraryName sandboxName levelName cellName viewName versionNumber generateDplOnly)
    ...
    *WARNING* (DEBASE-102079): A Skill error occurred in function My_Custom_Menu
    t
    hiCloseWindow(window(13))
    t

    ;**************************************** Program starts ********************************

    procedure(My_Custom_Menu()
    win=hiGetCurrentWindow()
     
    Item1= hiCreateMenuItem(?name 'disco1
                 ?itemText "&item1"
                ?callback "println(\"Amit\")"
                )
    Item2= hiCreateMenuItem(?name 'disco2
                 ?itemText "i&tem2"
                ?callback "println(\"Kumar\")"
                )
     
    Item3= hiCreateMenuItem(?name 'disco3
                 ?itemText "it&em3"
                ?callback "println(\"Biswas\")"
                )
    Item4= hiCreateMenuItem(?name 'disco4
                 ?itemText "item4"
                ?callback "println(\"Halisahar\")"
                )
    Item5= hiCreateMenuItem(?name 'disco5
                 ?itemText "item5"
                ?callback "println(\"Pandit Para\")"
                )
    Item6= hiCreateMenuItem(?name 'disco6
                 ?itemText "item6"
                ?callback "println(\"Rabindrapally\")"
                )
     
    hiCreatePulldownMenu('trSubMenu2 "Address" list(Item4 Item5))
    hiCreatePulldownMenu('trSubMenu3 "Addr" list(Item1 Item6))
    slidmenus2=hiCreateSliderMenuItem(
                ?name 'slidmenus2
                ?itemText "Slide2"
                ?subMenu trSubMenu2
                )
    slidmenus3=hiCreateSliderMenuItem(
                ?name 'slidmenus3
                ?itemText "Slide3"
                ?subMenu trSubMenu3
                )           
    hiCreatePulldownMenu('trSubMenu1 "Name" list(Item1 Item2 Item3 slidmenus3))

    slidmenus1=hiCreateSliderMenuItem(
                ?name 'slidmenus1
                ?itemText "Slide1"
                ?subMenu trSubMenu1
                )
    hiCreatePulldownMenu('trPulldownMenu "Amit Menu" list(slidmenus1 slidmenus2 Item6))
    hiInsertBannerMenu(win  trPulldownMenu length(hiGetBannerMenus(win)))
    ;hiDeleteBannerMenu(win length(hiGetBannerMenus(win)))
    );procedure
    deRegUserTriggers("maskLayout" nil nil 'My_Custom_Menu)
    • 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