本帖最后由 xyp1964 于 2025-3-11 13:47 编辑
 - (defun c:tt ()
- (defun Ustr (bit msg def spflag / inp nval)
- (if (and def (/= def ""))
- (setq msg (strcat "\n" msg "<" def ">: ")
- inp (getstring msg spflag)
- inp (if (= inp "")def inp)
- )
- (progn(setq msg (strcat "\n" msg ": "))
- (if (= bit 1)
- (while (= "" (setq inp (getstring msg spflag))))
- (setq inp (getstring msg spflag))
- )
- )
- )
- (if inp inp def)
- )
- (or tx (setq tx "15"))
- (setq tx (Ustr 1 "块名包含的字符串" tx nil)
- bn (strcat "*" tx "*")
- )
- (if (setq ss (ssget "X" (list '(0 . "insert") (cons 2 bn))))
- (sssetfirst nil ss)
- )
- (princ)
- )
|