Here is my problem. I am trying to make a menu for my company. We have three departments which all use there own stuff. But the stuff we share I don't want to copy 3 times into each pull down. I would like to have a general section on top of each pull down and then the tools for each department under that. something like this ***POP1 **General [General] [BLAH] [BLAH] **MENU1 [MENU!] (here would display the general stuff) [--] [Tools] [Blocks] [Layers]
Create a separate menu file for each department, then use the menuload command to specifically load menus per computer. See - http://www.markcad.com/autocad/acadtoolbars.htm http://www.caddigest.com/subjects/autocad/tutorials/select/index.htm for more info on "how to menus"
Something like this might work. ;; Menuload.lsp (fragment) ;; (setq local_drive "C:"); Local or Network Drive Letter + : ;; (if (findfile (strcat local_drive "/menus/dept1.mns")) (progn (if (= (menugroup "DEPT1") nil) (progn (command "_MENULOAD" (strcat local_drive "/menus/dept1")) (menucmd "P10=+DEPT1.POP1") ); end progn ); end if ); end progn ); end if (if (findfile (strcat local_drive "/menus/dept2.mns")) (progn (if (= (menugroup "DEPT2") nil) (progn (command "_MENULOAD" (strcat local_drive "/menus/dept2")) (menucmd "P10=+DEPT2.POP1") ); end progn ); end if ); end progn ); end if ;; ;; - next menu to check for.. (princ) --------------------- Menus: Dept1.mns ***MENUGROUP=DEPT1 ***POP1 [BLAH] [BLAH] Dept2.mns ***MENUGROUP=DEPT2 ***POP1 [BLAH] [BLAH]
We have two different groups, needing different commands in one of our pulldown menus. To reduce maintenance & coordination I wanted to share the same menu between groups, so I figured out how to use DIESEL expressions in the menu. There's a "check" item at the top of the menu which indicates which group's version is active. Top change it, you just check the other -- which runs a lisp routine to set the value of useri1 accordingly (thereby storing the setting in the drawing) and reload our other lisps, because some of them run differently depending on the value of useri1. Then depending on which group's menu version is active, DIESEL expressions are used to gray out options which aren't available. For instance [$(if,$(=,$(getvar,useri1),0),~)&Revision Date]^C^C^PREVDATE; One group uses a revision date stamp while the other doesn't.