• 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. Help on creating own menu in layout window

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 15548
  • 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

Help on creating own menu in layout window

SarathKumarG
SarathKumarG over 13 years ago

 Hi all,

       In Layout Window we have Create,Edit,tools,assura ...etc menus.Like theese menus i want to create my own menu in that i put some skill scripts.Plz let me know any help on this.I am using virtuoso 5.1 version.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Either create a pulldown menu using hiCreatePulldownMenu and then use deRegUserTriggers to register a user menu trigger - this can then return a list of pulldown menus to add for a particular application. Or look in <ICinstDir>/tools/dfII/etc/tools/menus (there's a README file in there) to see how to create menus files to add your own menus.

    There are solutions on this on the Cadence support site, or examples in the documentation (I'm sure - although I didn't check).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SarathKumarG
    SarathKumarG over 13 years ago

    Thanks Andrew,

                           I got below code in this forum.When i executing this code it shows error hiMenu@0xda630e8.

    Please help me on this issue.

     hiSetBindKey("Layout" "<Key>F10" "AmitAddMenu()")
    procedure(AmitAddMenu()
      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)

    Thank You.

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

    Two things wrong here:

    1. The bindkey is a bit pointless - if you hit F10, it will just return a list of the pulldown menu object, which is not very useful (maybe this is what you thought the error was?)
    2. The AmitAddMenu() is missing a required argument (deRegUserTriggers will call the function passing a disembodied property list with information about the window/design that is in the window being configured). Without this you get the following when you try to open a layout window:

    *Error* AmitAddMenu: too many arguments (0 expected, 1 given) - ((nil wasPushed nil prependList nil ... ))

    *WARNING* (DEBASE-102079): A SKILL error occurred in function AmitAddMenu

    *Error* __deRemoveDup: argument #1 should be a list (type template = "l") - t

     

    The answer is to make the code like this:

     

    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)

     

    With this, opening a new layout window will get the pulldown menu. Notice that in this case the args argument is not used - that's why I had previously given an example with an underscore prefix, which simply signals to SKILL Lint that the fact that the argument is unused is intentional. It has to be there, because the system calling the function will pass this argument, regardless of whether you need it or not.

     

    Regards,

     

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SarathKumarG
    SarathKumarG over 13 years ago

    Thanks Andrew,

                           It is working.Thank you very very much andrew.

    • 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