Popup Menu Name

MarcelGoulet

Usenet Archive
Joined
Jul 25, 2003
Messages
34
Reaction score
0
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
 
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.
 

Latest threads

Back
Top