PullDown Menu

Discussion in 'AutoCAD' started by MarcelGoulet, Aug 18, 2003.

  1. MarcelGoulet

    MarcelGoulet Guest

    Hi,

    How I can know, if a certain pulldown menu is displayed are not in a autoCad session using lisp ou vlisp ?

    The menu can be loaded, but the popup is not displayed.

    For exemple, if I want to know if Express pulldown menu is displayed ? How I can know that ?

    Thanks,

    Marcel
     
    MarcelGoulet, Aug 18, 2003
    #1
  2. MarcelGoulet

    Rudy Tovar Guest

    Pulldown Menus

    (if (not (menugroup "<Yourpulldown>"))(command "menuload" "c:/Program
    Files/AutoCAD 2004/Your Menu/Yourmenu.mns"))

    --
    Rodolfo Tovar
    www.Cadentity.com
    AUTODESK
    Authorized Developer






    autoCad session using lisp ou vlisp ?
     
    Rudy Tovar, Aug 18, 2003
    #2
  3. Did my answer to your previous thread on August 15th not
    solve your problem?
     
    Jason Piercey, Aug 18, 2003
    #3
  4. (defun rrbI:IsPopupDisplayed (popName / Found)
    (vl-Load-Com)
    (vlax-Map-Collection
    (vla-Get-MenuBar (vlax-Get-Acad-Object))
    (function
    (lambda (objPopup)
    (cond ((= popName (vla-Get-NameNoMnemonic objPopup))
    (setq Found T))))))
    Found)


    _$ (rrbI:IsPopupDisplayed "Express")
    T

    _$ (rrbI:IsPopupDisplayed "dsfsdfs")
    nil


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | after further testing, I see that it does not solve the problem....
    |
    | --
    |
    | -Jason
    | Member of the Autodesk Discussion Forum Moderator Program
    |
    |
    | | > Did my answer to your previous thread on August 15th not
    | > solve your problem?
    |
    |
     
    R. Robert Bell, Aug 18, 2003
    #4
  5. sho' nuff is!

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | ah yes.... and vla-Get-NameNoMnemonic sure is handy :)
    |
     
    R. Robert Bell, Aug 18, 2003
    #5
  6. MarcelGoulet

    Rudy Tovar Guest

    You're right. I had that worked out once, I can't remember how I did it
    anymore.

    I'm getting too old....
     
    Rudy Tovar, Aug 18, 2003
    #6
  7. That's why I prefer the NameNoMnemonic property; you don't have to mess with
    all those ampersands (&).

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Luis Esquivel" <www.draftteam.com> wrote in message
    | What Robert posted is the way to go.
    |
    | here is an alternative:
    |
    | (vlax-for i (vla-Get-MenuBar (vlax-Get-Acad-Object)) (print (vla-get-name
    | i)))
    | "&File"
    | "&Edit"
    | "&View"
    | "&Insert"
    | "F&ormat"
    | "&Tools"
    | "&Draw"
    | "Dime&nsion"
    | "&Modify"
    | "E&xpress"
    | "&Window"
    | "D&raftTeam"
    | "D&raftTeam"
    | _$
    |
    | and by following the above naming
    |
    | (if (not
    | (vl-catch-all-error-p
    | (setq
    | obj (vl-catch-all-apply
    | 'vla-item
    | (list (vla-Get-MenuBar (vlax-Get-Acad-Object))
    | "&Window")))))
    | (vla-get-onmenubar obj))
    |
    | it will return :vlax-true or' :vlax-false
    |
    |
     
    R. Robert Bell, Aug 19, 2003
    #7
  8. MarcelGoulet

    Doug Broad Guest

    Very nice Robert! Is string case important? :)
     
    Doug Broad, Aug 19, 2003
    #8
  9. You know as well as I do <vbg>. I like to match what I see on the pop menu's
    label, so I didn't force case matching.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Very nice Robert! Is string case important? :)
    |
    | | > sho' nuff is!
    | >
    | > --
    | > R. Robert Bell, MCSE
    | > www.AcadX.com
    | >
    | >
    | > | > | ah yes.... and vla-Get-NameNoMnemonic sure is handy :)
    | > |
    | >
    | >
    |
    |
     
    R. Robert Bell, Aug 19, 2003
    #9
  10. Happy to help.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Thanks Robert,
    | That's exactly what I need.
    |
    | Marcel
    |
     
    R. Robert Bell, Aug 19, 2003
    #10
  11. MarcelGoulet

    Doug Broad Guest

    <bwa ha ha> ;-)
    jes had ta du it.
     
    Doug Broad, Aug 19, 2003
    #11
  12. Hang wit' Doug and I fer' 'bout a mont' r tu, an' yuall git it then.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Luis Esquivel" <www.draftteam.com> wrote in message
    | Where I can learn that slang? any special school? or requirements :)
    |
    |
    | | > <bwa ha ha> ;-)
    | > jes had ta du it.
    | >
     
    R. Robert Bell, Aug 19, 2003
    #12
  13. MarcelGoulet

    Murph Guest

    Murph, Aug 19, 2003
    #13
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.