本帖最后由 baiyier1112 于 2013-4-27 00:40 编辑
想要将6@替换成8@,已解决- ;想要将6@替换成8@,x_s_s_1帮忙解决的
- (defun c:68( / ss n ent obj txt)
- (if (setq ss (ssget '((0 . "*text")(1 . "*6`@*"))))
- (repeat (setq n (sslength ss))
- (setq ent (ssname ss (setq n (1- n))))
- (setq obj (vlax-ename->vla-object ent))
- (setq txt (vla-get-textstring obj))
- (while (wcmatch txt "*6`@*")
- (setq txt (VL-STRING-SUBST "8@" "6@" txt)) )
- (vla-put-textstring obj txt)
- )
- )
- (princ)
- )
|