本帖最后由 baiyier1112 于 2013-5-5 23:30 编辑
程序3已经实现,程序1,2不知道问题出在哪,请高手指点一下- (defun x_ssn (ss / n lst)
- (repeat (setq N (sslength ss))
- (setq LST (cons (ssname SS (setq N (1- N))) LST))
- )
- )
- (defun c:150 (/ ss obj str en)
- (while (setq ss (ssget '((0 . "text") (1 . "%%13*`@*"))))
- (foreach en (x_ssn ss)
- (setq obj (vlax-ename->vla-object en)
- str (vla-get-TextString obj)
- )
- (vla-put-TextString obj(strcat(substr str 1 (1+(vl-string-search "@" str)))"150"(substr str (4+(vl-string-search "@" str)))))
- )
- )
- )
|