I have 3 custom menus which I'm trying to load into AutoCAD.
The script below was taken from a textbook and it was for AutoCAD 2000 (type SCRIPT to load file). It still sort of worked when I had 2 custom menus but the response from AutoCAD was inconsistent. Sometimes you could call up each script file and then both menus would load. Sometimes you'd load one, then the next one wouldn't load. Sometimes both would disappear from view. After a few trials, you'd eventually see 2 menu files.
I can't load 3 menu files though.
Having tried MENULOAD, each menu does load but I have an issue with the menu actions. The action is that a structural section is inserted. But with MENULOAD, it doesn't work.
Is there a way to resolve?
"BlockInsert" is set to is a LISP routine set to autoload.
To test, place in C drive in folder "POP103 Structural Steel".
SCRIPT
(if (and (not (findfile "STRUCTURAL_STEEL.mnu"))
(findfile "C:\\POP103 Structural Steel\\STRUCTURAL_STEEL.mnu")
)
(setenv "ACAD" (strcat (getenv "ACAD") "C:\\POP103 Structural Steel"))
)
(command "._MENULOAD" "STRUCTURAL_STEEL.mnu")
(menucmd "P103=+STRUCTURAL_STEEL.CTOPopSTRUCTURAL_STEEL")
MENU FILE
***MENUGROUP=STRUCTURAL_STEEL
***POP103
**CTOPopSTRUCTURAL_STEEL
[Structural Steel]
[->UB]
[530UB82]^C^C(BlockInsert "UniversalBeams_530UB82.0");scale;1;
[<-530UB92]^C^C(BlockInsert "UniversalBeams_530UB92.4");scale;1;
"BlockInsert"
(defun BlockInsert (blkname)
(command "_.-insert" (substr (strcat blkname "-" (menucmd "m=$(edtime,0,yymoddhhmmss)") "=" blkname) (+ (vl-string-position (ascii "_") blkname 1) 2)) pause 1 "" 0)
)