How can I get the position (POPn ) where a menu is, considering the other menues loaded (ACAD, Expres.. etc)
For example:
File Edit View Insert . .Express WIndow Help DOBLADO PCSMEN. .. and I need to know the position of DOBLADO.
Thanks in advance
Solved! Go to Solution.
Solved by markruys2. Go to Solution.
Is your goal just to rearrange them all to an office standard order? You don't need to know where they are to do that.
Misread the thread.
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
What I need is if it is already loaded, replece it with another, depending it on the action set before, becouse each menu has its own function , and both must no coexist
I'm trying to find working with vla-get-menugroups and vla-get-menus functions to find if it is possible
;; will return the pulldown location (indexed 1) loaded menu pop if suceessful else 0
(defun POPNUMBER (name / mnl mnu mnc) ;; not case sensitive (POPNUMBER "DOBLADO")
(setq mnl nil mnu (vla-get-menubar (vlax-get-acad-object)) mnc (vla-get-count mnu) mnl nil)
(repeat mnc (setq mnl (cons (vla-get-name (vla-item mnu (setq mnc (1- mnc)))) mnl)) )
(vl-position name (mapcar '(lambda (e)(strcase (vl-string-subst "" "&" e))) mnl)) )
Sorry I forgot to inform that the code works OK, and that was the reason I accepted it as solution, and it is what I was looking for: a function that check the menu voice and let me informed about if it is displayed or not
Thanks to all
In my limited tests it appeared to not quite function as the notes mentioned,
should be case-sensitive friendly, and doesn't account for the possibility of
the same pop menu name defined in different menu groups. My point is, it
has the potential to provide false results.