• 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
  • skillUser
    skillUser over 14 years ago

    Hi Amit,

    There are a couple of ways to approach this, you can either define menu items via a menus file, i.e. the layEdit.menus in this case, which would reside in your ./menus/ or ~/menus directory, or you can create the menus and add them via SKILL.  Here's a brief example of the bits that you might need for that approach:


    procedure(AmitAddMenu(args)
    let( ((win args->window) item1 item2 menu)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "My First Item"
    ?callback "AmitFunctionOne()"
    )
    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "My Second Item"
    ?callback "AmitFunctionTwo()"
    )
    ;; create a menu that includes the menu items
    menu = hiCreatePulldownMenu('AmitMenu "Amit Menu" list(item1 item2))
    ;; insert this menu as the last menu
    hiInsertBannerMenu(win menu length(hiGetBannerMenus(win))
    );let
    ); procedure
    ;; create a user postinstall trigger that automatically adds the menu

    deRegUserTriggers("maskLayout" nil nil 'AmitAddMenu)

    You might need to add code to check if the menu is already present, but hopefully this framework gives you an idea of how to do it.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 14 years ago

    Hi Amit,

    There are a couple of ways to approach this, you can either define menu items via a menus file, i.e. the layEdit.menus in this case, which would reside in your ./menus/ or ~/menus directory, or you can create the menus and add them via SKILL.  Here's a brief example of the bits that you might need for that approach:


    procedure(AmitAddMenu(args)
    let( ((win args->window) item1 item2 menu)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "My First Item"
    ?callback "AmitFunctionOne()"
    )
    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "My Second Item"
    ?callback "AmitFunctionTwo()"
    )
    ;; create a menu that includes the menu items
    menu = hiCreatePulldownMenu('AmitMenu "Amit Menu" list(item1 item2))
    ;; insert this menu as the last menu
    hiInsertBannerMenu(win menu length(hiGetBannerMenus(win))
    );let
    ); procedure
    ;; create a user postinstall trigger that automatically adds the menu

    deRegUserTriggers("maskLayout" nil nil 'AmitAddMenu)

    You might need to add code to check if the menu is already present, but hopefully this framework gives you an idea of how to do it.

    Regards,

    Lawrence.

    • 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