I could tell immediately by this line (command "MENULOAD") that you are using LISP
Did you also say that you use menu/cui load manually as well?
That may be a better idea.
Under normal circumstances, my code will do the partial menu loading. If I have a need to load a partial menu individually, I will use (command "MENULOAD" "MENUFILE") if I want no POPs to be automatically loaded, or plain MENULOAD if I do want them loaded.
So, that will load the cui into CAD but not populate the menubar at all, is that correct?
Correct for (command "MENULOAD"), yes, but not for manual use of MENULOAD.
Also, I did notice in VBA, that menubar is still available, so there may be a chance that I can load it and populate the menubar programmatically. That seems to be what you are doing.
I would expect the menu bar to continue to be available and programmable for a long time to come. Even if large number of 2009 users were not still using the traditional interface, the new Menu Browser needs it anyway.
I would be interested in seeing your LISP code if that is something that you are comfortable with.
Here's some example code I threw together. This is a simplified version of some production code that has its origins in 1994, and is provided here as-is and completely untested:
; Example call
;(load_partial_menu_example
; "MYMENU" ; Filename of menu, no extension, can include path
; "MYGROUP" ; Name of menu group
; "ID_MINE" ; ID of any POP menu item
; '(1) ; POP number(s) of pull-downs to load
;)
;
; Example MYMENU.mnu contents
;
;***MENUGROUP=MYGROUP
;
;***POP1
;ID_XXX [My Menu]
;ID_MINE [My First Command]^C^CWhatever
; [Other command]^C^CSomething
(defun load_partial_menu_example (FNAME MGROUP ID POPLIST
/ penultimate_menu)
(defun penultimate_menu (/ #)
(setq # 1)
(while (menucmd (strcat "P" (itoa #) ".1=?"))
(setq # (1+ #))
)
(- # 1) ; Location before Help pull-down
) ; End penultimate_menu
; Start load_partial_menu_example
(while (not (menucmd "P1.1=?"))) ; Wait for menu to load before acting (R13 bug workaround)
(if (not (menucmd (strcat "G" MGROUP "." ID "=?"))) ; Only load if not already there
(progn
(command) ; Cancel anything else
(if (findfile (strcat FNAME ".cui")) ; Give priority to CUI file if found
(command "_.CUILOAD" (strcat FNAME ".cui"))
(command "_.MENULOAD" FNAME)
)
(foreach pop POPLIST ; Load pull-downs as required
(menucmd
(strcat
"P" (itoa (penultimate_menu)) "=+" MGROUP ".POP" (itoa pop)
)
)
)
)
)
(princ)
) ; End load_partial_menu_example