• 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 add a custom menu to CIW

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 145
  • Views 19606
  • 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 add a custom menu to CIW

NcfC
NcfC over 11 years ago
Hi,

I'm using IC5141 and I'm trying to add a custom menu to CIW,


procedure( Menu_CIW()
ciwMenuInit()
menu_ciw = hiCreatePulldownMenu( 'Menu_CIW "CusTools" list( menuItem_1 menuItem_2 menuItem_3 ) )
hiInsertBannerMenu( window(1) menu_ciw 3 )
)

and I've add a line in .cdsinit to load the scripts at startup:

load( "/path/to/script/cmenu.il" )

When icfb starts, it doesn't show the custom menu in the ciw banner. I've also tried to explicitly call the function Menu_CIW() inside .cdsinit, but it also didn't work. It works only if I call the function from the command line in ciw.

Can anyone help me understand why it is not working?

thanks in advance.

best regards,
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    The code as you wrote it wouldn't work because it doesn't define menuItem_1 etc. I just added this to my .cdsinit:

    procedure( Menu_CIW()
    ciwMenuInit()
    menuItem_1=hiCreateMenuItem(?name 'item1 ?itemText "ITEM 1")
    menuItem_2=hiCreateMenuItem(?name 'item2 ?itemText "ITEM 2")
    menuItem_3=hiCreateMenuItem(?name 'item3 ?itemText "ITEM 3")
    menu_ciw = hiCreatePulldownMenu( 'Menu_CIW "CusTools" list( menuItem_1 menuItem_2 menuItem_3 ) )
    hiInsertBannerMenu( window(1) menu_ciw 3 )
    )
    Menu_CIW()

    and it works fine. Of course you need to call Menu_CIW() from the .cdsinit otherwise it won't actually invoke the code.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NcfC
    NcfC over 11 years ago
    Hi, Andrew.

    thanks fir the promptly reply.

    The codes for menuitem_* are defined elsewhere in the script file; sorry for not specified that!

    But you're right about calling the code. I forgot to invoke the procedure!

    thanks.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NiyazEA
    NiyazEA over 11 years ago

     Hi,

      I want to create submenu's under mainMenu. But I am getting below error. Please help me to fix it.

     Error:

    load "/auto/project/spt/jklayouts/vis180nm_io_pad/users/niyaz/scripts/icfb_menu2.il"
    function Menu_CIW_TOP redefined
    "hiiGetMenuSymbols: invalid menu item: "hiMenu@0xced9c58
    "hiiGetMenuSymbols: invalid menu item: "hiMenu@0xced9c68
    "hiiGetMenuSymbols: invalid menu item: "hiMenu@0xced9c78
    invalid menu itemhiMenu@0xced9c58
    invalid menu itemhiMenu@0xced9c68
    invalid menu itemhiMenu@0xced9c78
    *Error* get/getq: second arg must be a symbol or a string - nil
    *Error* load: error while loading file - "/auto/project/spt/jklayouts/vis180nm_io_pad/users/niyaz/scripts/icfb_menu2.il"


    Script:


    procedure( Menu_CIW_TOP()
    ciwMenuInit()

    menuItem_11=hiCreateMenuItem(?name 'item11 ?itemText "ITEM 11" ?callback f11())
    menuItem_12=hiCreateMenuItem(?name 'item12 ?itemText "ITEM 12" ?callback f12())
    menuItem_13=hiCreateMenuItem(?name 'item13 ?itemText "ITEM 13" ?callback f13())

    menuItem_21=hiCreateMenuItem(?name 'item21 ?itemText "ITEM 21" ?callback f21())
    menuItem_22=hiCreateMenuItem(?name 'item22 ?itemText "ITEM 22" ?callback f22())
    menuItem_23=hiCreateMenuItem(?name 'item23 ?itemText "ITEM 23" ?callback f23())

    menuItem_31=hiCreateMenuItem(?name 'item31 ?itemText "ITEM 31" ?callback f31())
    menuItem_32=hiCreateMenuItem(?name 'item32 ?itemText "ITEM 32" ?callback f32())
    menuItem_33=hiCreateMenuItem(?name 'item33 ?itemText "ITEM 33" ?callback f33())

    submenu1 = hiCreatePulldownMenu( 'Menu_CIW1 "Menu1" list( menuItem_11 menuItem_12 menuItem_13 ) )
    submenu2 = hiCreatePulldownMenu( 'Menu_CIW2 "Menu2" list( menuItem_21 menuItem_22 menuItem_23 ) )
    submenu3 = hiCreatePulldownMenu( 'Menu_CIW3 "Menu3" list( menuItem_31 menuItem_32 menuItem_33 ) )

    menu_ciw_top = hiCreatePulldownMenu('Menu_CIW_TOP "Main Menu" list(submenu1 submenu2 submenu3))

    hiInsertBannerMenu( window(1) menu_ciw_top 9)
    )
    Menu_CIW_TOP()

     

    Thanks

    Niyaz

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Niyaz,

    First of all, posting this in an existing thread (please read the forum guidelines) is not recommended. Secondly, sending me a direct email message 2 minutes after posting this is not going to make me answer it any quicker (especially when I'm on a plane across the Atlantic). In fact it tends to have the opposite effect. If something is that urgent that you need to chase me (when it's not part of my job to respond here - I do it in my spare time), you should contact customer support.

    Anyway, the solution is simple. After adding quotes around the callbacks (so ?callback "f11()"), you need to create slider menu items:

    slider1=hiCreateSliderMenuItem(?name 'slider_CIW1 ?itemText "Menu1" ?subMenu submenu1)
    slider2=hiCreateSliderMenuItem(?name 'slider_CIW2 ?itemText "Menu2" ?subMenu submenu2)
    slider3=hiCreateSliderMenuItem(?name 'slider_CIW3 ?itemText "Menu3" ?subMenu submenu3)

    menu_ciw_top = hiCreatePulldownMenu('Menu_CIW_TOP "Main Menu" list(slider1 slider2 slider3))

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 11 years ago

    Another way to add menu items to the ciw is creating a ciw.menus file in ~/meus directory. You can also place the menus directory in your work directory if you prefer to have separate ciw menus per project.

    Example of a ciw.menus file:


    daMenu      = '(myMenu "My Stuff" (
                    (strCase        "StringCase"    "println(\"booya1\")")
                    (validLayer     "Valid Layers"  "println(\"booya2\")")
                    (trySlider      "Cool Stuff" (
                            (mySlider1        "Test1" "println(\"booya3\")")
                            (mySlider2        "Test2" "println(\"booya4\")")
                            ))
                    )); end of Utilities menu
    daLoadFile  = '(lscr "mySkill" (
                    (skLintGui      "Lint"          "skShowForm()")
                    (cdsFind        "cdsFinder"     "startFinder()")
                    (skillIde       "Skill IDE"     "_ilgRunSkillIde()")
                    (refresh        "Refresh List"  "println(\"booya5\")")
                    (reLoad         "Reload File"   "println(\"booya6\")")
                    (xscripts       "xScripts File" (
                            (holder "" "")
                            ))
                    (virtuoso       "Virtuoso File" (
                            (holder "" "")
                            ))
                    (bindkey        "Bindkey File"  (
                            (holder "" "")
                            ))
                    )); end of loadFile

    newLocalCiwMenu = '(daMenu daLoadFile)

    ciwMenuList = append(ciwMenuList newLocalCiwMenu)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • NiyazEA
    NiyazEA over 11 years ago

    Sorry for disturbing you. Thank you very much for the solution.

     

    Thanks

    Niyaz

     

    • 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