Home > Community > Forums > Custom IC Design > How to create personalized menu in virtuoso layout editor

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: *

 How to create personalized menu in virtuoso layout editor 

Last post Fri, Nov 2 2012 11:31 AM by jaleco. 29 replies.
Started by AmitBiswas 03 Dec 2010 07:10 AM. Topic has 29 replies and 12126 views
Page 2 of 2 (30 items) < Previous 1 2
Sort Posts:
  • Wed, Jan 12 2011 4:05 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

     hi Andrew,

         thanks, have a good day!

    Regards,

    zfeng

    Regards, zfeng
    • Post Points: 5
  • Thu, Jan 13 2011 4:07 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

     Hi Andrew,

         do you mean that we can't load the user defined menus in ADE by modifying the .cdsinit file directly?

    regards,

    zfeng

    Regards, zfeng
    • Post Points: 20
  • Thu, Jan 13 2011 5:30 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

    Hi Zfeng,

    No, I didn't say that. You can either use a menus file (which wouldn't be done via the .cdsinit), or using:

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

    which could be added  in your .cdsinit (along with a function defined MYinitSession which could add the menus, I guess).

    Regards,

    Andrew.

    • Post Points: 20
  • Mon, Jan 17 2011 8:30 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

     Hi Andrew,

         I have found there are many *.menus in folder(tools/menus), but I think these are all system bulit in and only can be read, so if the user want to create their own menu file, where to loacate it? in the work directory ? which one is the best reference manul about this?

    Regards,

    zfeng 

    Regards, zfeng
    • Post Points: 20
  • Mon, Jan 17 2011 8:48 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: How to create personalized menu in virtuoso layout editor Reply

     Hi Zfeng,

    You can create a "menus" directory in your home directory, or current working directory, for example, and then have an appropriately named <tool>.menus file - this file can be used to reference the default menus file, for example load it in and then modify the structures in place, if you only needed a small alteration from the original.  Some menus are easier to do this way, in my opinion. Here is a brief example of changing the File->Exit item in the CIW menus using this method:


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

    ;; only when the ciwFilePulldown menu exists
    when(pairp(ciwFilePulldown)
    ;; create a local variable to store the Exit item
    let( ((exitItem assoc('ExitItem caddr(ciwFilePulldown))))
    ;; replace the callback on the Exit item to be MYexit()
    ;; if the correct menu structure is found

    when(and(exitItem cddr(exitItem))
    setcar(cddr(exitItem) "MYexit()")
    )
    )
    )

    The file would be called "ciw.menus" and be in the menus directory as mentioned above.  This modifies the menu callback of the existing File -> Exit menu item such that the function "MYexit()" is called instead of the default callback.

    I hope that this is helpful.

    Lawrence.

    • Post Points: 20
  • Wed, Feb 9 2011 7:32 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

     Hi Lawrence,

         I have got the brief idea, and i am still confused about some tips

    1, you just modify an exit function in the user "ciw.menus" in the above example, i want to know if the other functions will be saved/reserved as the default function in the ciw menus.

    2. Can  the "MYexit()" function be defined in other file skill file?

    3.how to check wether user's menus(xxx.menus) is working well, i mean that check it in CIW 

    4. i want to add a user menu in analogArtist simulation window, but i'm not clear about which viewType should i use to register my menu trigger deRegUserTriggers()

    5. if i change the analogArtist menu by modifying the simui.menus(is it the menus for analogArtist simulation window), i want to add a menu item under the Tools menu(below the parametric analysis), what i need to do is just add my menu item name and callback function in the Tools section in the simui.menus. by the way, do i need to create this menu item before i add it or not?

    sorry for askiing so many question!

    Regards,

    zfeng

     

    Regards, zfeng
    • Post Points: 20
  • Wed, Feb 9 2011 12:40 PM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: How to create personalized menu in virtuoso layout editor Reply

    Hi Zfeng,

    I will try to answer each of your questions.

    1) Yes, the benefit of modifying the list "in place" is that everything else remains as it was and should have the default behaviour.

    2) Again, yes, typically your utility functions would be defined in a file that is read by the .cdsinit startup SKILL file (or the function could be defined directly in the .cdsinit file, but generally it is cleaner to load these files).

    3) ?? Eh?  Start the session, test it.  For debugging purposes you might be able to add a printf statement at the end of the file to say that the something.menus file was loaded, you should see it in the CIW.  If you are modifying existing menus without adding or removing anything else then the menu may appear to look the same; perhaps this is your question?  Through SKILL you could check what the menu item callback was...

    4)  Sorry, I have not customized the ADE menus, so I will leave this to Andrew or someone else to reply to.

    5) Did you read the <instDir>/tools/dfII/etc/tools/menus/simui.menus file?  I believe it mentions a function sevAddMenuItemLists() that you might be able to use.  Again, I have not played with customizing the ADE menus, so someone else may be able to add some value here.

    Regards,

    Lawrence.

    • Post Points: 5
  • Thu, Feb 10 2011 1:53 AM

    RE: How to create personalized menu in virtuoso layout editor Reply
    Hi Lawrence,

    Thanks for answering my questions, these day i often search on internet, and i find many guys confused to add user menus in analog artist, so i want to make this problem clearly, and others can refer to our posts. thanks again

    Regards,
    zfeng
    Regards, zfeng
    • Post Points: 5
  • Wed, Oct 19 2011 6:24 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

     Hi Andrew,

                     When i executes your above code it shows error unbound var  _args .So i assign _args = geGetWindowCellView.it shows 

    error  (hiMenu@0xf2b9088).plz let me know advice on this.

    • Post Points: 20
  • Wed, Oct 19 2011 6:38 AM

    Re: How to create personalized menu in virtuoso layout editor Reply

    Which code are you talking about? Is it the code in this link? If so, I can't see why it would complain about _args being unbound. Setting it to geGetWindowCellView() would be wrong, but it wouldn't cause that error. It doesn't really matter what it's assigned to, because it's not used (that's why I used the underscore convention to indicate that this is an argument that must be there, but isn't used inside the function).

    Please (not "plz" - there's no tax on characters here, so please use proper English words rather than instant messaging shorthand - see the Forum Guidelines) could you post the code you're actually using - that will make it clear an unambiguous. In fact you really should have started a new topic rather than carrying on an old one which is nearly a year old - also covered in the guidelines. But you've done it now...

    Regards,

    Andrew.

    • Post Points: 5
  • Thu, Nov 1 2012 5:01 PM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: How to create personalized menu in virtuoso layout editor Reply

    Andrew,

    How would we define a menu item that intentionally reloads the menu so we can test its functions, by reloading it from the interface, instead of closing the session each time?  The userMenuTrigger will not allow itself to be reloaded, preventing an update to the menu in-session.

    I am using something like the following in my attempt -

    [Menu_Item_Update = hiCreateMenuItem(?name 'Update ?itemtext "Update" ?callback "load("Menu.il") ); ]

    unless(!boundp('Menu)

      deRegUserTriggers("maskLayout" nil 'Menu)

    ); unless

    So if my Menu is already defined, it is not being re-registered. It may be getting updated, but is not reflected in the current session.  If I remove the "unless" construct, I get

    *Error* User menu trigger already registered for viewtype maskLayout.

    *Error* load: error while loading file - "Menu.il"

    • Post Points: 20
  • Thu, Nov 1 2012 5:14 PM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: How to create personalized menu in virtuoso layout editor Reply

    I see that the bang (!) character was misused, but regardless, the userMenuTrigger will not allow a reload of the menu in the same session.  Is there a way around this?

    • Post Points: 5
  • Thu, Nov 1 2012 10:12 PM

    • AmitBiswas
    • Top 500 Contributor
    • Joined on Sun, Jan 25 2009
    • Bangalore, Karnataka
    • Posts 22
    • Points 575
    Re: How to create personalized menu in virtuoso layout editor Reply

    Jaleco, 

    You could update the manu without closing the session, all you need to do is before adding menu just check if that menu exists or not.

    If it exists , please remove from the window and add again.

     hiInsertBannerMenu(win  trPulldownMenu length(hiGetBannerMenus(win)))

    before the above command you need to remove the exixting menu if it exists.

    Thanks,

    Amit 

     

    • Post Points: 20
  • Fri, Nov 2 2012 11:28 AM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: How to create personalized menu in virtuoso layout editor Reply

    Hi Amit,

    thank you for your response.  I don't know how my post got attached to this thread - I was replying to the following example by Andrew Beckett and have created a new Post per his guidelines -

    http://www.cadence.com/Community/forums/p/17476/1245483.aspx#1245483

    Per his guidance I am avoiding the InsertBannerMenu construct in favor of the list passed as a MenuTrigger argument to deRegUserTriggers()....but not finding that it works for something that needs to be redefined in-session.

    • Post Points: 5
  • Fri, Nov 2 2012 11:31 AM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Albuquerque, NM
    • Posts 74
    • Points 1,060
    Re: How to create personalized menu in virtuoso layout editor Reply

    Ah, I see, there are 2 pages of thread and I was initially looking at the first page....

    • Post Points: 5
Page 2 of 2 (30 items) < Previous 1 2
Sort Posts:
Started by AmitBiswas at 03 Dec 2010 07:10 AM. Topic has 29 replies.