(defun hss()
(setq bhzg nil)
(if (and (not txt)(not bhx))
(princ(strcat"\n 1=10+,2=20+,3=3+,4=4+,4+=50,-=2,*=3,/=4,5~9对应相同数\n 左键+1右键1,0输入值,+数字编号,A文字引线,Q画↙空格改字高 "(rtos zigao)" ") ) )
(if (and (not txt)(= bhx 1))
(princ(strcat"\n 1=10+,2=20+,3=3+,4=4+,4+=50,-=2,*=3,/=4,5~9对应相同数\n 左键点选对象(空选=1),右键前缀编号,0输入值,空格设置字高 "(rtos zigao)" ") ) )
(if (and (not txt)(= bhx 2))
(princ(strcat "\n 0输入值,1=10+,2=20+,3=3+,4=4+,4+=50,-=2,*=3,/=4,5~9对应相同数,空格=4\n 左键 "ts" 右键 2-"ts) ) )
(if (/= txt nil)
(princ "\n 0输入深度,1=10+,2=20+,3=3+,4=4+,4+=50,-=2,*=3,/=4,5~9对应相同数") )
(setq aj (grread)) (cond ;(setq u (grread))回车后按任意键
;((= (car aj) 3) (if (/= txt nil)(QuXiao)()) ) ;左键+1
((= (car aj) 25) (if(/= txt nil)(QuXiao)) (if(not bhx)(setq hs 1)) (if(= bhx 1)(qianzhuibh))
(if(= bhx 2)(progn(if(not ts)(setq ts"")(setq ts(strcat"-"ts)))(hs+)) ) ) ;右键1
((= (cadr aj) 48) (if (/= txt nil)(setq hs (getint"\n 请输入深度:")) (setq hs (getint"\n 请输入起始数:")) ) ) ;0输入起始数
((= (cadr aj) 32) (if (/= txt nil)(QuXiao)) (if (/= bhx 2)(progn (setq bhzg 1)(xgbzzg))) (if (= bhx 2)(setq hs 4)) ) ;空格设置字高
((= (cadr aj) 43) (setq bhx 1) ) ;+数字编号
((= (cadr aj) 97) (setq bhx "A") ) ;a文字引线
((= (cadr aj) 65) (setq bhx "A") ) ;A文字引线
((= (cadr aj) 81) (setq jt "Q") (c:ps) ) ;q画箭头
((= (cadr aj) 113) (setq jt "Q") (c:ps) ) ;Q画箭头
;;;;;;;;;;;;;;;;;;;
(defun hs+() ;右键+1
(if (not hs)
(progn (setq hs 1) (princ (strcat"\n 左键 2" ts" 右键 3"ts) ))
(progn (if(= hs 2)(setq hs 3))(princ(strcat"\n 左键 "(rtos hs)ts" 右键 "(rtos(1+ hs))ts)) ))
(if (getpoint)
(setq hs (if(= hs 1)2 hs))
(progn (setq hs (1+ hs)) (hs+))
) )
自己改一下吧