Popup Menu Name

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

  1. MarcelGoulet

    MarcelGoulet Guest

    Hi,

    Is there a way to know if a popup name is display or not ?

    I have a popup menu called "Synchrone".
    If I wan't to know if that menu is there, is there a way in lisp to know it ?

    Thanks,

    Marcel
     
    MarcelGoulet, Aug 15, 2003
    #1
  2. Something like this....

    ; [menu] - string, menugroup name
    ; return: list of strings or nil
    (defun getPulldownMenuNames (menu / rtn)
    (or *acad* (setq *acad* (vlax-get-acad-object)))
    (vl-catch-all-apply
    '(lambda ()
    (vlax-for
    item
    (vla-get-menus
    (vla-item (vla-get-menugroups *acad*) menu)
    )
    (setq
    rtn
    (cons
    (vl-string-subst "" "&" (vla-get-name item))
    rtn
    )
    )
    )
    )
    )
    (reverse rtn)
    )

    You can then use (member) or (vl-position) etc... to determine
    if the name you are looking for is in the returned list.
     
    Jason Piercey, Aug 15, 2003
    #2
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.