- (defun c:reghotkey()
- (setq string_cmd "ZOOM W" )
- ;;将ZOOM W命令赋值给热键F1快捷键
- (defun REGHOTKEYmnu(/ f file)
- (vl-Load-com)
- (if (menugroup "REGHOTKEY" )(vl-cmdf "MENUUNLOAD" "REGHOTKEY"))
- (prin1)
- (if (null(menugroup "REGHOTKEY"))
- (progn
- (setq file(strcat(getenv "Temp")"\\REGHOTKEY.mnu"))
- (setq f (open file "w"))
- (foreach line
- (list
- "***MENUGROUP=REGHOTKEY"
- "***ACCELERATORS"
- (strcat "["F1"] ^C^C" string_cmd)
- )
- (write-line line f)
- )
- (close f)
- (vl-cmdf "menuload" (findfile file))
- )
- )
- (vl-acad-undefun 'REGHOTKEYmnu)
- (princ)
- )
- (REGHOTKEYmnu)
- )
|