• 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 create and add submenu options in virtuoso windo...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 12749
  • 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 and add submenu options in virtuoso window

saurabh96
saurabh96 over 3 years ago

Hello ,

am using below code to add Cadence option menu in virtuoso


setupItem = (hiCreateMenuItem
?name 'Setup
?itemText "Setup"
?callback "(println \"WELCOME TO CADENCE\") Switches()" )

Menu = (hiCreatePulldownMenu
(gensym)
"CADENCE"
(list setupItem))

(hiInsertBannerMenu window( 1 ) Menu (length (hiGetBannerMenus (window 1))) )

and its generating output as-

Now is that there way instead of appearing as new Cadence option ,its should appear as submenu under VGI option which is pre-existing?

How i can do that...when i click VGI option CADENCE menu should appear and when click on CADENCE window then setup option should appear?

How can i acheive that?

Regards,

Thomas

  • Cancel
Parents
  • mbracht
    mbracht over 3 years ago

    Hi,

    Have you tried this?
    (hiAddMenuItem <VGIMenu> setupItem)

    with <VGIMenu> being the Pulldown Menu VGI. You can get a list of all Pulldown Menus in the CIW with (hiGetBannerMenus (window 1))

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 3 years ago in reply to mbracht

    Hello Max,

    Thanks for quick reply.

    Still am not getting the desired result as when am clicking VGI options ...CADENCE menu is undisplayable.

    Can you please suggest what the error and how can i correct it?

    procedure(Menu()
    let((setupItem )
    setupItem = hiCreateMenuItem(
    ?name 'Setup
    ?itemText "Setup"
    ?callback "(println \"WELCOME TO CADENCE\") Switches()" )

    (hiAddMenuItem VGIMenuItem setupItem)

    Menu = (hiCreatePulldownMenu
    (gensym)
    "CADENCE"
    (list setupItem))

    (hiInsertBannerMenu window( 1 ) Menu (length (hiGetBannerMenus (window 1))) )
    )
    )

    Thomas

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • saurabh96
    saurabh96 over 3 years ago in reply to mbracht

    Hello Max,

    Thanks for quick reply.

    Still am not getting the desired result as when am clicking VGI options ...CADENCE menu is undisplayable.

    Can you please suggest what the error and how can i correct it?

    procedure(Menu()
    let((setupItem )
    setupItem = hiCreateMenuItem(
    ?name 'Setup
    ?itemText "Setup"
    ?callback "(println \"WELCOME TO CADENCE\") Switches()" )

    (hiAddMenuItem VGIMenuItem setupItem)

    Menu = (hiCreatePulldownMenu
    (gensym)
    "CADENCE"
    (list setupItem))

    (hiInsertBannerMenu window( 1 ) Menu (length (hiGetBannerMenus (window 1))) )
    )
    )

    Thomas

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • mbracht
    mbracht over 3 years ago in reply to saurabh96

    Hi Thomas,

    I don't quit get your code - you create a menu item (setupItem) and then make a call to hiAddMenuItem specifying VGIMenuItem as first argument. In fact the first argument to hiAddMenuItem() needs to be the containing menu - the variable VGIMenuItem implies that this is a menu item though. Subsequently  you specify setupItem as a menu item in the CADENCE menu...I thought you wanted it in the VGI menu????
    Let me explain again how this works, when you create a pull down menu you can populate it with menu items at the time when you create the menu or lateron when with hiAddMenuItem(). Here is an example of a CADENCE pulldown menu that is populated with one item during it's creation and another one lateron.

    (let (item1 item2)
       item1 = (hiCreateMenuItem
                   ?name (gensym)
                   ?itemText "Click me..."
                   ?callback "(println \"ooops...I just got clicked!\")" )
       item2 = (hiCreateMenuItem
                   ?name (gensym)
                   ?itemText "Never click me!"
                   ?callback "(println \"I told you not to click me didn't I?\")")
       playMenu = (hiCreatePulldownMenu
                      (gensym)
                      "CADENCE"
                      (list item1))
       (hiAddMenuItem playMenu item2)
       (hiInsertBannerMenu window( 1 ) playMenu (length (hiGetBannerMenus (window 1))) ))

    • 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