• 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. Adding new item to already created custom menu (for all...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14906
  • 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

Adding new item to already created custom menu (for all Layout Editor windows)

Sheppy
Sheppy over 10 years ago

Hello,

I am working on a library that contains many macro functions to automate certain parts of the layout. Depending on the need, per project some macro's will be needed/loaded, and some won't. All these macro's must be available in a pull-down menu, which will be available in all layout editor windows. All macro's will be loaded at start-up of Virtuoso, and I want to include in that code a part that adds a menu item for that particular macro.

One menu item is always loaded, so I used that to generate the menu. I have copied the code of: http://community.cadence.com/cadence_technology_forums/f/48/p/20591/1304715#1304715 to generate the menu and this single item.

For this topic, I'd like to refer to the aforementioned topic and the code as posted by Andrew. See below:


procedure(AmitAddMenu(args)
  let( (item1 item2)
    ;; 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 and return a list of the
    ;; pulldown menus
    list(hiCreatePulldownMenu('AmitMenu "Amit Menu" list(item1 item2)))
  );let
); procedure
;; create a userMenuTrigger trigger that automatically adds the menu
deRegUserTriggers("maskLayout" nil 'AmitAddMenu)


So lets say, I load this code and get in all layout editor windows the menu with the two options.

How do I get a third item in this pull-down menu by code loaded at start-up of Virtuoso (this code will be loaded after the code with the two options of course)?

Thank you in advance.

With kind regards,

Sjoerd

  • Cancel
Parents
  • Sheppy
    Sheppy over 10 years ago

    Hi Andrew,

    Thank you for the quick response. And thank you for the perfect answer. It works like a charm. Bit embarrassing though that I did not find that procedure myself (the hiAddMenuItem one). And the code you wrote (without testing it yourself) worked straight out of the box.

    With kind regards,

    Sjoerd

    ps: I assigned a bind-key to the same call-back procedure and the menu item gets this bind-key printed next to it, automatically. Very neat!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Sheppy
    Sheppy over 10 years ago

    Hi Andrew,

    Thank you for the quick response. And thank you for the perfect answer. It works like a charm. Bit embarrassing though that I did not find that procedure myself (the hiAddMenuItem one). And the code you wrote (without testing it yourself) worked straight out of the box.

    With kind regards,

    Sjoerd

    ps: I assigned a bind-key to the same call-back procedure and the menu item gets this bind-key printed next to it, automatically. Very neat!

    • 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