Home > Community > Forums > Custom IC SKILL > some thing about the user menus in ADE!(complete!)

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Wed, May 1 2013 2:44 PM by Andrew Beckett. 16 replies.
Started by imagesensor123 09 Feb 2011 04:33 AM. Topic has 16 replies and 4193 views
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts:
  • Wed, Feb 9 2011 4:33 AM

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

     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

    Regards, zfeng
    • Post Points: 20
  • Thu, Feb 10 2011 12:16 PM

    • tyanata
    • Top 75 Contributor
    • Joined on Mon, May 3 2010
    • Posts 86
    • Points 1,435
    Re: some thing about the user menus in ADE! Reply

     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
     

     

     

     

    • Post Points: 20
  • Thu, Feb 10 2011 1:29 PM

    RE: some thing about the user menus in ADE! Reply
    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
    Regards, zfeng
    • Post Points: 20
  • Fri, Feb 11 2011 12:11 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Mon, May 3 2010
    • Posts 86
    • Points 1,435
    Re: RE: some thing about the user menus in ADE! Reply

    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

    • Post Points: 20
  • Fri, Feb 11 2011 1:44 AM

    RE: RE: some thing about the user menus in ADE! Reply
    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
    Regards, zfeng
    • Post Points: 35
  • Fri, Feb 11 2011 2:02 AM

    Re: RE: RE: some thing about the user menus in ADE! Reply

    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.

    • Post Points: 20
  • Fri, Feb 11 2011 2:10 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Mon, May 3 2010
    • Posts 86
    • Points 1,435
    Re: RE: RE: some thing about the user menus in ADE! Reply

     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)

    • Post Points: 20
  • Fri, Feb 11 2011 3:17 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Mon, May 3 2010
    • Posts 86
    • Points 1,435
    Re: RE: RE: some thing about the user menus in ADE! Reply

    Helle Andrew ,

     I used for base of my work exactly this solution 11286092

     

    Best regards,

     

    tyanata

    • Post Points: 5
  • Fri, Feb 11 2011 3:34 AM

    Re: RE: RE: some thing about the user menus in ADE! Reply

    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.

    • Post Points: 20
  • Fri, Feb 11 2011 5:27 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Mon, May 3 2010
    • Posts 86
    • Points 1,435
    Re: RE: RE: some thing about the user menus in ADE! Reply

     

     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

    • Post Points: 20
  • Sat, Feb 12 2011 2:53 PM

    Re: RE: RE: some thing about the user menus in ADE! Reply

    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.

    • Post Points: 20
  • Wed, Apr 24 2013 2:52 PM

    • NcfC
    • Top 500 Contributor
    • Joined on Mon, Feb 27 2012
    • Chandler, AZ
    • Posts 28
    • Points 440
    Re: RE: RE: some thing about the user menus in ADE! Reply
    Hi, I tried to run the code tyanata first posted but I got the following error:
    *Error* sevAddMenuItemLists: too many arguments (1 expected, 2 given) - (funobj@0x20d5d6bc 2)
    Could you help me?

    Thanks,

    Best regards,
    • Post Points: 20
  • Thu, Apr 25 2013 3:02 AM

    Re: RE: RE: some thing about the user menus in ADE! Reply

    I just tried that code in IC5141 (the menus file looks as if it was written for IC5141) and it worked fine. It suggests to me that you've altered the code in some way, because it shows that sevAddMenuItemLists has two arguments, the second of which is the number 2. That's not in the code anywhere, so presumably something got changed when you cut and pasted it?

    Which version of Virtuoso are you trying to use?

    Andrew.

    • Post Points: 35
  • Thu, Apr 25 2013 10:07 AM

    • tyanata
    • Top 75 Contributor
    • Joined on Mon, May 3 2010
    • Posts 86
    • Points 1,435
    Re: RE: RE: some thing about the user menus in ADE! Reply

     Hello Andrew,

     

    Yes the code was written for IC5, for IC6 we use the same approach but some of the names of the default menu items are changed, so the script is little bit modified.

     

    Best regards,

    Stoyan

     

    • Post Points: 20
  • Tue, Apr 30 2013 4:37 AM

    Re: RE: RE: some thing about the user menus in ADE! Reply

    Based on an email message sent to me by  NcfC (not sure why that user didn't post here, since they posted before) - the email was a bit scramble, but it said

    NcfC:
    When I load the above code into CIW, I don't get any error nor warning messages, but I don't see the added menu entry in the ADE window.Could you help me?Thank you very much in advance.Best regards,Noel Carneiro

    Well, you're not supposed to load the code into the CIW. You're supposed to create a file called spectre.menus in a subdirectory called menus (e.g. as a subdirectory of your working dir or home dir).

    Regards,

    Andrew.

     

     

    • Post Points: 5
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts:
Started by imagesensor123 at 09 Feb 2011 04:33 AM. Topic has 16 replies.