• 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. some thing about the user menus in ADE!(complete!)

Stats

  • Locked Locked
  • Replies 16
  • Subscribers 145
  • Views 8667
  • 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

some thing about the user menus in ADE!(complete!)

imagesensor123
imagesensor123 over 14 years ago

 Hi,

    After refering to the analogartist reference, i have copie the simui.menus to my home directory( or work directory), and modify it to add a menu in Tools by add this line ("mytool" ?callback()) in the Tools section of the simui.menus file, but this menu did not turn up when the analogArtist stratup. it seems that the default menus are loaded in ADE. Does anyone know the reason? when i use the command ddGetStartupAll("menus"), the result shows ("~/menu"), i think it is the menu folder which i placed in my home folder. i got quite confused about how to add a user menu in ADE, thanks for explaining this method to me.

         by the way, i have load this menu by adding this line "load("~/menu/simui.menus")" in my .cdsinit.

Regards,

zfeng

  • Cancel
  • tyanata
    tyanata over 14 years ago

     Hello zfeng,

    In responce of your question. I already succeeded to add my menu item on the top of the ADE window. Follow the instruction:

     

    1. Create folder "menus" in your home dyrektory.

    2. Create file spectre.menus in the folder "menus"

    3. Put following text in spectre.menus, it creates custom menu item "Example" with 3 submenus: Item1, Item2 and Item3:

     



    load(prependInstallPath("/etc/tools/menus/spectre.menus"))


    (sevSetMainWindowPulldownMenus

      `(

        "Session"

        "Setup"

        "Analyses"

        "Variables"

        "Outputs"

        "Simulation"

        "Results"

        "Tools"
       
        "Example"  

        "Help"

        )
    )



    (sevAddMenuItemLists

      (lambda (session name)

        (case name

          ("Example"
         
            list(

                        hiCreateMenuItem(
                              ?name 'MenuItem_1
                              ?itemText "Item1"
                              ?callback "println('Item1)" ;;; prints Item1 in the CIW
                  ;this is only trial function callback
                                )
               
                        hiCreateMenuItem(
                              ?name 'MenuItem_2
                              ?itemText "Item2"
                              ?callback "println('Item2)" ;;; prints Item2 in the CIW
                  ;this is only trial function callback
                                )
       
                        hiCreateMenuItem(
                              ?name 'MenuItem_3
                              ?itemText "Item3"
                              ?callback "println('Item3)" ;;; prints Item3 in the CIW
                  ;this is only trial function callback
                                )
       
                )
       
           ) ;Example

          ) ; case

        ) ; lambda

      ) ; sevAddMenuItemLists
     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 14 years ago
    Hi,
    Thanks, follow your example, i have added a user menu in the ADE, but when i try to add a menu item in the "Tools" menu, i failed. do you know how to add a menu item under the "Tools" menu banner.
     
    i don't understand why "load(prependInstallPath("/etc/tools/menus/spectre.menus"))" in the user spectre.menus, could you please explain it to me.
    Thanks.
    Regards,
    zfeng
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tyanata
    tyanata over 14 years ago

    1. First with this expression
    load(prependInstallPath("/etc/tools/menus/spectre.menus"))

    you load the original sepctre menus, and after that on its base you make your custom settings.

     

    2. Here I post how to create custom subitem in Tools menu. Create spectre.menus file with following text. 

     


    ;------------------------------------------------------------------------

    ; Example of extending the spectre menu Tools and add new subitem "My_menu"

    ;------------------------------------------------------------------------

     

    load(prependInstallPath("/etc/tools/menus/spectre.menus"))

     

    ; redefine the top level menus - this time putting

    ; a space after "Tools " to distinguish it from original "Tools"

    (sevSetMainWindowPulldownMenus

      `(

        "Session"

        "Setup"

        "Analyses"

        "Variables"

        "Outputs"

        "Simulation"

        "Results"

        "Tools "

        "Help"

        )
    )



    (sevAddMenuItemLists

      (lambda (session name)

        (case name

    ; Example of creating submenu in menu item "Tools "exchanging oringinal "Tools" menu! 

    ;------------------------------------------------------------------------

    ; now define the "Tools " menu, appending the

    ; new stuff to the already defined "Tools" menu items...

    ; Also replace existing items

    ;------------------------------------------------------------------------

        ("Tools "



            menu_list = (sevMenuItems session "Tools")

                           new = list( hiCreateMenuItem(
                              ?name 'My_MenuItem
                              ?itemText "My_menu"
                              ?callback "println('My_menu)" ;;; prints My_menu in the CIW
                  ;this is only trial function callback
                                )
                    )


                               menu_list = append(menu_list new)

           ) ; Tools


          ) ; case

        ) ; lambda

      ) ; sevAddMenuItemLists

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 14 years ago
    Hi,
       thanks for replying so fast. you have given an explain in detail, but why one can't add a menu item directly like the syntax in the menus file,
    i add this line in the Tools section
     ("Tools"
         `( "here i delete the parametric analysis"
           ("Corners" ?callback (sevCornersTool ',session) ?form t ?disable (sevNoEnvironment ',session))
           ("Monte Carlo" ?callback (sevMonteCarloTool ',session) ?form t ?disable (sevNoEnvironment ',session))
           ("Optimization" ?callback (sevOptimizationTool ',session) ?form t ?disable (sevNoEnvironment ',session))
           ("separator")
           ("Calculator" ?callback (sevOpenCalculator) ?form t)
           ("Results Browser" ?callback (sevOpenDRLBrowser)! ?form t)
           ("Waveform" ?callback (sevOpenPlotWindow ',session) ?form t)
           ("Results Display" ?callback (sevOpenPrintWindow ',session) ?form t)
           ("Job Monitor" ?callback (sevOpenJobMonitor) ?form t)
           ("userform" ?callback (zfShowImagerForm ',session) ?form t)
           ("add user..." ?callback (zfShowImagerForm ',session) ?form t)
    the two lines (red color)  don't work, and the "parametric analysis" still turn up in ADE main window. so i think modify the menus directly is not a available approach. Another, i don't know why there is a " ' " in every callback function, such as callback (sevOpenPlotWindow ',session),
    could you please explain this callback syntax here.

    and about your method, i also have a question, you have changed the top level menus in the ADE window, is it necessary or just for distinguishing the original one? can we still use the "Tools" and append the original with the "my_menu"?

    Thanks

    Regards,
    zfeng
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Zfeng,

    The approach of replacing the "Tools" menu with "Tools " is something that I came up with - it's in solution 11286092

    This solution has an example with lots of comments (it's for Simulation rather than Tools, but it's the same idea) which explain why you are doing this. It's trying to avoid having to reimplement the whole of the standard menu in the local customization - it inherits from the one in the installation. So it has to load it first, and then be able to find out the contents of the existing Tools (or Simulation in my case) menu and build on that. 

    Since the sevAddMenuItemLists is defining a function to call which builds the menu info, if you call the menu the same (no space), then it will only ever find yours, and not the standard one. There are ways around this, but they currently require private functions.

    The reason for the quoting is because if you look closely, you'll see that the backquote (i.e. "`") is being used. This is similar to the forward quote, in that it stops the list after it being evaluated except when the symbol is preceded by a comma or comma-at. This allows values to be spliced into the list that is built, without disturbing the structure. The best way to explain this is probably to look at my solution on macros. Rather than me reinventing the wheel and repeating it here!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tyanata
    tyanata over 14 years ago

     Hello again,

     

    Your questions are difficult for me to answer (I am not very experienced in SKILL also). I just found the solution of the task using the both solutions from the Cadence support which I posted in my topic as base for my work.

    Currently I have to cope with another problem in Cadence environment which I use, in ADE there is a custom button created in some script from our foundry. I want to disable it using the approach bellow but it seems that this button is loaded some time (several seconds) after ADE launching so I could not disable it using this approach.

     

    The script itself works because after this button is created on my ADE if I load commands one by one in CIW this button is deleted.

     

    So can you say how to postpone execution of my scripts let's say with 10 seconds.

     

     procedure(triggerScriptLoad(ADE_WindowID)

       ADE_WindowID=hiGetCurrentWindow()
       menuList=hiGetBannerMenus(ADE_WindowID)
       Unnecessary_Menu=nth(9 menuList)

       hiDeleteBannerMenu(ADE_WindowID 9)
    ; Delete the menu item number 0 is the leftmost menu item.

       hiRaiseWindow(ADE_WindowID)

      )

    deRegUserTriggers("analogArtist-schematic" nil nil 'triggerScriptLoad)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tyanata
    tyanata over 14 years ago

    Helle Andrew ,

     I used for base of my work exactly this solution 11286092

     

    Best regards,

     

    tyanata

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

    I think it would be best to check the name of the banner menu before deleting it, but the way to delay things would be to use hiRegTimer() to schedule the function to do the deletion to some point in the future. You probably need to record the current window though, because it's possible the current window may have changed by the time your delayed function kicks in.

    It might be better to try to use the cdsenv variable I suggested earlier to set up the trigger, because the de trigger you're using won't work if you've (say) saved an ADE state in a cellView, and then you open the state cellView directly (say from the library manager) - because there's no schematic open to fire the de triggers.

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tyanata
    tyanata over 14 years ago

     

     Hello again,

    I realised trigerring using the function

     envSetVal("asimenv.startup" "sessInitTrigFunc" 'string "triggerScriptLoad")

     I just included this line in my .cdsinit file

    But even using hiRegTimer up to 20 seconds I could not delete the unnecessary ADE menu item.

    It is very strange because when I launch ADE after 2-3 second I already see that this menu item is loaded on the ADE window. But after 20 second when the delay of my function finishes the response of the following 2 lines:

    menuList=hiGetBannerMenus(ADE_WindowID)

    Unnecessary_meni_item=nth(9 menuList)

     The response is: sevHelpMenu1. Which is the name of the "Help" button. But after that when type same commands in CIW the repsonse is the exact name of the menu item whic i want to delete.

    It seems that this menu item is trigered later than ADe starting.

     

    Best reagards,

    tyanata

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

    It's probably not wise to just blindly delete the 9th item - maybe you should search along the list until you get the value you're looking for, and then delete that?

    You may also be best off contact customer support - and then we could perhaps do a remote web session and take a look. Without knowing the details of the PDK and what it is doing, there's a bit of guess work here.

    Best Regards,

    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