customize right-click menu

Discussion in 'AutoCAD' started by Kelie, Jan 19, 2005.

  1. Kelie

    Kelie Guest

    Hello,


    I was doing some customization to the right-click menu portion in
    acad.mns and I wondered whether it is possible to run a lisp first
    against the clicked object and depending on the return value of lisp,
    create different right-click menu. The situations in which I'd like to
    acheive this the most is for many different blocks. The goal is when
    right-clicking on different blocks, different ShortcutMenu (which
    envokes different lisp commands) will be displayed. I'm aware that in
    VBA, there are events related to ShortcutMenu such as
    BeginShortcutMenuCommand. But I did not find such events in visual
    lisp. Are they exposed in lisp? Any suggestion? Thanks to all.
     
    Kelie, Jan 19, 2005
    #1
  2. Kelie

    Matt W Guest

    Our customized right-click menu has a title of Add Selected and when someone
    clicks on a particular item, be it a leader, block, mtext, pline, etc... a
    different command will be run.
    I use the CONDition statement to determine what action should be taken based
    on the object type (and name in the case of blocks).

    Hope this helps.
     
    Matt W, Jan 19, 2005
    #2
  3. Kelie

    Kelie Guest

    Thanks for your reply Matt.

    <QUOTE>
    I use the CONDition statement to determine what action should be taken based
    on the object type (and name in the case of blocks).
    </QUOTE>

    In above, if I understand correctly, your routine does not create different
    menus when right-clicking blocks with different names, right? Rather, you
    have those block names and corresponding lisp/actions set up in your
    routine.
     
    Kelie, Jan 20, 2005
    #3
  4. Kelie

    Matt W Guest

    You got it!
     
    Matt W, Jan 20, 2005
    #4
  5. Kelie

    Matt W Guest

    If you need help writing the LSP, let me know.
     
    Matt W, Jan 20, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.