Tharwat先生为什么我不能这样用呢
- (defun c:Test (/ ss sn p st e find replase)
- ;; Tharwat 29.9.2015 ;;
- (setq find (getstring "Find "))
- (setq replace (getstring "Replase "))
-
-
- (if (setq ss (ssget "_:L" '((0 . "TEXT")(1 . *find*))))
- (while (setq sn (ssname ss 0))
- (if (setq p (vl-string-search exist (setq st (cdr (assoc 1 (setq e (entget sn)))))))
- (entmod (subst (cons 1 (strcat (substr st 1 p) replace (substr st (+ 3 p)))) (assoc 1 e) e))
- )
- (ssdel sn ss)
- )
- )
- (princ)
- )
|