- (DEFUN C:TT(/ E ET LST O RANGE SL SS1 STR STRNEW STROLD)
- (setq et(vlax-get-or-create-object"excel.application"))
- (setq range(BF-excel-getusedrange et (BF-excel-getActiveSheet et)))
- (setq lst(BF-excel-getrangevalue et (BF-excel-getrangeindex range)));内容
- (setq ss1(ssget'((0 . "*text"))))
- (setq sl(sslength ss1))
- (repeat sl
- (setq e(ssname ss1(setq sl(1- sl))))
- (setq o(vlax-ename->vla-object e))
- (setq strold(vlax-get o'textstring))
- (if (setq str(car(vl-remove-if-not '(lambda(x)(WCMATCH strold (strcat"*"(car x)"*")))lst)));有这个文字
- (progn
- (setq strnew(vl-string-subst (cadr str)(car str)strold));新内容
- (vlax-put o'textstring strnew)
- )
- )
- )(prompt"***大懒猪荣誉出品***")
- (princ)
- )
无法上传附近百度云链接:http://pan.baidu.com/s/1c1X67mC 密码:rac5
|