AutoCAD LSP加载cui文件,不显示菜单
当使用LISP自动加载菜单时,不显示菜单(PROGN (command "采用.cuiload") (command "test.cui"))
可通过加载CUI之后,通过修改注册表menu值来显示菜单,LISP代码具体代码如下:
(DEFUN CX-PLACEMENU (TY / N)
(setq NA "hst")
(if (MENUGROUP NA)
(PROGN
(setq N 1)
(while (and (< N 24))
(if (MENUCMD (STRCAT "P" (ITOA N) ".1=?"))
(PROGN (setq N (+ N 1)))
(PROGN
(if (>= N 11)
(PROGN
(if (< (ATOF (GETVAR "acadver")) 18.0)
(PROGN (MENUCMD (STRCAT "p10=+" NA ".pop1")))
(PROGN (MENUCMD (STRCAT "p11=+" NA ".pop1")))
)
(setq N 25)
)
(PROGN
(if (> N 3) (PROGN (setq N (- N 2))) (PROGN (setq N 3)))
(MENUCMD (STRCAT "p" (ITOA N) (STRCAT "=+" NA ".pop1")))
(setq N 25)
)
)
)
)
)
)
)
(PRINC)
)
(if (FINDFILE "test.cui")
(PROGN (command "采用.cuiload") (command "test.cui"))
)
(PROGN (CX-PLACEMENU "test"))
页:
[1]