MarcoW Posted March 1, 2010 Posted March 1, 2010 This is the lisp code I found on www.Afralisp.net : ;set the flag (setq flag1 T) ;check if the "TESTMENU" menu is loaded (setq loaded (menugroup "TESTMENU")) ;if it's not (if (= loaded nil) (progn ;find the menu file (setq temp (findfile "TESTMENU.MNU")) ;if it's found (if temp (progn (setvar "FILEDIA" 0) ;load the "TESTMENU" menu (command "menuload" "TESTMENU") (setvar "FILEDIA" 1) ;load the pulldown menu [color=red](menucmd "P11=+TESTMENU.POP1")[/color] ;Inform the user (prompt "\nLoading TESTMENU Custom Menu....\n") );progn (progn ;if it's NOT found, inform the user (alert "Cannot Locate TESTMENU Menu.") ;then clear the flag (setq flag1 nil) );progn );if );progn );if ;if the menu is loaded (if flag1 ;inform the user (prompt "\nTESTMENU Custom Menu Loaded....") );if (princ) );defun (princ) I loaded into a clean install of autocad 2010 (trial version) and it worked... if it weren't that it has unloaded all of AutoCAD's own menus as well as the ribbon. Can anyone explain to me why that happens? I guess that the red part is the cause but I cannot explain. Thanks allready! Quote
MarcoW Posted March 1, 2010 Author Posted March 1, 2010 I have been trying on and on... (menucmd "P[b]16[/b]=+TESTMENU.POP1") Seems to be thé (or just a coincidental) solution. Appears that it has to do with the menuorder ... Anyway, works for me. Quote
MarcoW Posted March 1, 2010 Author Posted March 1, 2010 I thought I read somewhere that it was up to max 16... ? I can try though. Thanks for reply. Quote
alanjt Posted March 1, 2010 Posted March 1, 2010 I thought I read somewhere that it was up to max 16... ? I can try though.Thanks for reply. There's a max to the number it will store. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.